asset-hash
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -8,3 +8,2 @@ /// <reference types="node" /> | ||
digest(): DigestResult; | ||
init?(): Hash; | ||
} | ||
@@ -11,0 +10,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! asset-hash v4.0.4 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! asset-hash v4.0.5 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
'use strict'; | ||
@@ -180,3 +180,4 @@ | ||
const buffer = data instanceof Buffer ? data : Buffer.from(data.toString(), "utf-8"); | ||
return this.hasher.update(buffer); | ||
this.hasher.update(buffer); | ||
return this; | ||
} | ||
@@ -183,0 +184,0 @@ |
/// <reference types="node" /> | ||
import { DigestOptions, SupportedEncoding } from "./encode"; | ||
import { Hash, HashAlgorithm, initHashClasses } from "./hash"; | ||
import { HashAlgorithm, initHashClasses } from "./hash"; | ||
export declare type HashOptions = DigestOptions & { | ||
@@ -13,3 +13,3 @@ algorithm?: HashAlgorithm; | ||
constructor(options?: HashOptions); | ||
update(data: string | Buffer): Hash; | ||
update(data: string | Buffer): Hasher; | ||
digest(encoding?: SupportedEncoding, maxLength?: number): string; | ||
@@ -16,0 +16,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! asset-hash v4.0.4 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! asset-hash v4.0.5 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
import 'core-js/modules/es.error.cause.js'; | ||
@@ -172,3 +172,4 @@ import { createReadStream } from 'fs'; | ||
const buffer = data instanceof Buffer ? data : Buffer.from(data.toString(), "utf-8"); | ||
return this.hasher.update(buffer); | ||
this.hasher.update(buffer); | ||
return this; | ||
} | ||
@@ -175,0 +176,0 @@ |
{ | ||
"name": "asset-hash", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Very fast asset hashing function for using e.g. during front-end deployments.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.cjs.js", |
@@ -10,11 +10,11 @@ # _Asset Hash_ | ||
[sponsor]: https://www.sebastian-software.de | ||
[sponsor-img]: https://badgen.net/badge/Sponsored%20by/Sebastian%20Software/c41e54 | ||
[m1]: https://en.wikipedia.org/wiki/Apple_M1 | ||
[apple-img]: https://badgen.net/badge/M1/Ready/cyan?icon=apple | ||
[wasm]: https://en.wikipedia.org/wiki/WebAssembly | ||
[wasm-img]: https://badgen.net/badge/WASM/Powered/654ff0 | ||
[npm]: https://www.npmjs.com/package/asset-hash | ||
[github]: https://github.com/sebastian-software/asset-hash/actions | ||
[sponsor-img]: https://badgen.net/badge/Sponsored%20by/Sebastian%20Software/c41e54 | ||
[apple-img]: https://badgen.net/badge/M1/Ready/cyan?icon=apple | ||
[wasm-img]: https://badgen.net/badge/WASM/Powered/654ff0 | ||
[npm-downloads-img]: https://badgen.net/npm/dm/asset-hash | ||
[npm-version-img]: https://badgen.net/npm/v/asset-hash | ||
[github]: https://github.com/sebastian-software/asset-hash/actions | ||
[github-img]: https://badgen.net/github/status/sebastian-software/asset-hash?label=tests&icon=github | ||
@@ -21,0 +21,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
488
53090