File: index.d.ts

package info (click to toggle)
node-buffer-equal 1.0.1%2B~1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: javascript: 65; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/// <reference types="node" />

export = bufferEqual;

/**
 * @return Whether the two buffers are equal.
 *
 * @example
 * import bufferEqual = require('buffer-equal');
 *
 * console.dir(bufferEqual(
 *     Buffer.from([253,254,255]),
 *     Buffer.from([253,254,255])
 * ));
 * // -> true
 *
 * console.dir(bufferEqual(
 *     Buffer.from('abc'),
 *     Buffer.from('abcd')
 * ));
 * // -> false
 */
declare function bufferEqual(a: Buffer, b: Buffer): boolean;