buffer-crc32/ 000755 001751 000177 0000000000 14522265601 014725 5 ustar 00runner 000000 000000 14522265601 14522265601 buffer-crc32/LICENSE 000644 001751 000177 0000002165 14522265601 015736 0 ustar 00runner 000000 000000 14522265601 14522265601 MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
buffer-crc32/README.md 000644 001751 000177 0000004516 14522265601 016205 0 ustar 00runner 000000 000000 14522300156 14522265601 # Installation
> `npm install --save @types/buffer-crc32`
# Summary
This package contains type definitions for buffer-crc32 (https://github.com/brianloveswords/buffer-crc32).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/buffer-crc32.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/buffer-crc32/index.d.ts)
````ts
///
export = crc32;
/**
* crc32 that works with binary data and fancy character sets.
*
* @example
* import crc32 = require('buffer-crc32');
*
* // works with buffers
* const buf = Buffer.from([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]);
* crc32(buf); // ->
*
* // will cast to buffer if given a string, so you can
* // directly use foreign characters safely
* crc32('自動販売機'); // ->
*
* // and works in append mode too
* let partialCrc = crc32('hey');
* partialCrc = crc32(' ', partialCrc);
* partialCrc = crc32('sup', partialCrc);
* partialCrc = crc32(' ', partialCrc);
* const finalCrc = crc32('bros', partialCrc); // ->
*/
declare function crc32(input: string | Buffer, partialCrc?: Buffer | number): Buffer;
declare namespace crc32 {
/**
* Convenience method that returns a signed int instead of a `Buffer`.
*
* @example
* import crc32 = require('buffer-crc32');
*
* // works with buffers
* const buf = Buffer.from([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]);
* crc32.signed(buf); // -> -1805997238
*/
function signed(buffer: string | Buffer, partialCrc?: Buffer | number): number;
/**
* Convenience method that returns an unsigned int instead of a `Buffer`.
*
* @example
* import crc32 = require('buffer-crc32');
*
* // works with buffers
* const buf = Buffer.from([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]);
* crc32.unsigned(buf); // -> 2488970058
*/
function unsigned(buffer: string | Buffer, partialCrc?: Buffer | number): number;
}
````
### 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 [BendingBender](https://github.com/BendingBender).
buffer-crc32/index.d.ts 000644 001751 000177 0000003254 14522265601 016632 0 ustar 00runner 000000 000000 14522265601 14522265601 ///
export = crc32;
/**
* crc32 that works with binary data and fancy character sets.
*
* @example
* import crc32 = require('buffer-crc32');
*
* // works with buffers
* const buf = Buffer.from([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]);
* crc32(buf); // ->
*
* // will cast to buffer if given a string, so you can
* // directly use foreign characters safely
* crc32('自動販売機'); // ->
*
* // and works in append mode too
* let partialCrc = crc32('hey');
* partialCrc = crc32(' ', partialCrc);
* partialCrc = crc32('sup', partialCrc);
* partialCrc = crc32(' ', partialCrc);
* const finalCrc = crc32('bros', partialCrc); // ->
*/
declare function crc32(input: string | Buffer, partialCrc?: Buffer | number): Buffer;
declare namespace crc32 {
/**
* Convenience method that returns a signed int instead of a `Buffer`.
*
* @example
* import crc32 = require('buffer-crc32');
*
* // works with buffers
* const buf = Buffer.from([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]);
* crc32.signed(buf); // -> -1805997238
*/
function signed(buffer: string | Buffer, partialCrc?: Buffer | number): number;
/**
* Convenience method that returns an unsigned int instead of a `Buffer`.
*
* @example
* import crc32 = require('buffer-crc32');
*
* // works with buffers
* const buf = Buffer.from([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]);
* crc32.unsigned(buf); // -> 2488970058
*/
function unsigned(buffer: string | Buffer, partialCrc?: Buffer | number): number;
}
buffer-crc32/package.json 000644 001751 000177 0000001521 14522265601 017205 0 ustar 00runner 000000 000000 14522300156 14522265601 {
"name": "@types/buffer-crc32",
"version": "0.2.4",
"description": "TypeScript definitions for buffer-crc32",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/buffer-crc32",
"license": "MIT",
"contributors": [
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/buffer-crc32"
},
"scripts": {},
"dependencies": {
"@types/node": "*"
},
"typesPublisherContentHash": "03fd630755032ad8d1eba8bfdb035e17cd87b256c148fcc8c6e66eed5a1737d2",
"typeScriptVersion": "4.5"
}