Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / grunt / node_modules / nodeunit / node_modules / tap / node_modules / buffer-equal / README.markdown
1 buffer-equal
2 ============
3
4 Return whether two buffers are equal.
5
6 [![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal)
7
8 example
9 =======
10
11 ``` js
12 var bufferEqual = require('bufferEqual');
13
14 console.dir(bufferEqual(
15     new Buffer([253,254,255]),
16     new Buffer([253,254,255])
17 ));
18 console.dir(bufferEqual(
19     new Buffer('abc'),
20     new Buffer('abcd')
21 ));
22 console.dir(bufferEqual(
23     new Buffer('abc'),
24     'abc'
25 ));
26 ```
27
28 output:
29
30 ```
31 true
32 false
33 undefined
34 ```
35
36 methods
37 =======
38
39 ``` js
40 var bufferEqual = require('buffer-equal')
41 ```
42
43 bufferEqual(a, b)
44 -----------------
45
46 Return whether the two buffers `a` and `b` are equal.
47
48 If `a` or `b` is not a buffer, return `undefined`.
49
50 install
51 =======
52
53 With [npm](http://npmjs.org) do:
54
55 ```
56 npm install buffer-equal
57 ```
58
59 license
60 =======
61
62 MIT