Skip to content
Newer
Older
100644 61 lines (44 sloc) 724 Bytes
98c6019 @substack readme test and example
authored May 11, 2012
1 buffer-equal
2 ============
3
4 Return whether two buffers are equal.
5
6 example
7 =======
8
9 ``` js
10 var bufferEqual = require('bufferEqual');
11
12 console.dir(bufferEqual(
13 new Buffer([253,254,255]),
14 new Buffer([253,254,255])
15 ));
16 console.dir(bufferEqual(
17 new Buffer('abc')
18 new Buffer('abcd')
19 ));
20 console.dir(bufferEqual(
21 new Buffer('abc'),
22 'abc'
23 ));
24 ```
25
26 output:
27
28 ```
29 true
30 false
31 undefined
32 ```
33
34 methods
35 =======
36
37 ``` js
38 var bufferEqual = require('buffer-equal')
39 ```
40
41 bufferEqual(a, b)
42 -----------------
43
44 Return whether the two buffers `a` and `b` are equal.
45
46 If `a` or `b` is not a buffer, return `undefined`.
47
48 install
49 =======
50
51 With [npm](http://npmjs.org) do:
52
53 ```
54 npm install buffer-equal
55 ```
56
57 license
58 =======
59
60 MIT
Something went wrong with that request. Please try again.