mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
18 lines
411 B
TypeScript
18 lines
411 B
TypeScript
import * as crc from "crc";
|
|
import * as fs from "fs";
|
|
|
|
// tests move from the readme of the module
|
|
|
|
crc.crc32('hello').toString(16);
|
|
// "3610a686"
|
|
|
|
crc.crc32(fs.readFileSync('README.md', 'utf8')).toString(16);
|
|
// "127ad531"
|
|
crc.crc32(fs.readFileSync('README.md')).toString(16);
|
|
// "127ad531"
|
|
|
|
let value = crc.crc32('one');
|
|
value = crc.crc32('two', value);
|
|
value = crc.crc32('three', value);
|
|
value.toString(16);
|