1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# Installation
> `npm install --save @types/buffer-equal`
# Summary
This package contains type definitions for buffer-equal (https://github.com/substack/node-buffer-equal).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/buffer-equal.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/buffer-equal/index.d.ts)
````ts
/// <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;
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds).
|