How to use the md5-file/promise.sync function in md5-file

To help you get started, we’ve selected a few md5-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / md5-file / md5-file-tests.ts View on Github external
import * as md5 from "md5-file";
import * as md5Promise from "md5-file/promise";

// $ExpectType void
md5("test.txt", (err, hash) => {
	return;
});

// $ExpectType string
md5.sync("text.txt");

// $ExpectType Promise
md5Promise("test.txt");

// $ExpectType string
md5Promise.sync("text.txt");

md5-file

Get the MD5-sum of a given file, with low memory usage, even on huge files.

MIT
Latest version published 5 years ago

Package Health Score

71 / 100
Full package analysis