simple-file-verification
v5.0.1
Published
Library to calculate SFV checksums from files and streams
Maintainers
Readme
simple-file-verification
Library to calculate SFV checksums from files and streams.
Installation
npm install simple-file-verification -S
Usage
import * as SFV from 'simple-file-verification';
import { createReadStream } from 'node:fs';
await SFV.fromFile('path/to/file');
// Serving the purpose of an example
const fileStream = createReadStream('path/to/file')
await SFV.fromStream(fileStream);API
fromFile
Usage: fromFile(filePath: string)
Returns checksum for specified file.
fromStream
Usage: fromStream(fileStream: Readable)
Returns checksum for readable stream.
Related
License
This work is licensed under The MIT License.
