3.0.4 • Published 1 year ago

simple-file-verification v3.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
1 year ago

simple-file-verification

Library to calculate SFV checksums from files and streams.

License Version: npm Version: jsr Build: NodeJS Build: Deno

Installation

npm install simple-file-verification -S

Usage

import * as SFV from "simple-file-verification";
import { createReadStream } from "node:fs";

(async () => {
	await SFV.fromFile("path/to/file");
	await SFV.fromFiles("path/to/*.pdf");
	await SFV.fromStream(createReadStream("path/to/file"));
})();

API

All API methods default to SFV's standard CRC32 algorithm. You can also specify the extended SFV (.sfvx) algorithms MD5, SHA-1, SHA-256, or SHA-512.

fromFile

Usage: fromFile(filePath, algorithm?)

Returns checksum for specified file

fromFiles

Usage: fromFiles(filePath, algorithm?)

Returns array of files/checksums objects for specified glob

fromStream

Usage: fromStream(readableStream, algorithm?)

Returns checksum Node.js readable stream

Related

License

This work is licensed under The MIT License.

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago