Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 62 lines (45 sloc) 0.855 kb
98c60193 »
2012-05-11 readme test and example
1 buffer-equal
2 ============
3
4 Return whether two buffers are equal.
5
2205205c »
2012-05-11 using travis
6 [![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal)
7
98c60193 »
2012-05-11 readme test and example
8 example
9 =======
10
11 ``` js
63e755dd »
2012-07-09 fix require()
12 var bufferEqual = require('buffer-equal');
98c60193 »
2012-05-11 readme test and example
13
14 console.dir(bufferEqual(
15 new Buffer([253,254,255]),
16 new Buffer([253,254,255])
17 ));
18 console.dir(bufferEqual(
ee448efb »
2012-05-11 working implementation
19 new Buffer('abc'),
98c60193 »
2012-05-11 readme test and example
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
Something went wrong with that request. Please try again.