asset-hash
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -1,2 +0,2 @@ | ||
/*! asset-hash v2.1.1 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! asset-hash v2.1.2 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
'use strict'; | ||
@@ -21,3 +21,3 @@ | ||
var DEFAULT_HASH = "metrohash128", | ||
DEFAULT_ENCODING = "hex", | ||
DEFAULT_ENCODING = "base52", | ||
DEFAULT_MAX_LENGTH = 8, | ||
@@ -24,0 +24,0 @@ XXHASH_CONSTRUCT = 0xcafebabe, |
@@ -1,2 +0,2 @@ | ||
/*! asset-hash v2.1.1 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! asset-hash v2.1.2 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
import 'core-js/modules/es6.promise'; | ||
@@ -14,3 +14,3 @@ import 'core-js/modules/es6.regexp.to-string'; | ||
var DEFAULT_HASH = "metrohash128", | ||
DEFAULT_ENCODING = "hex", | ||
DEFAULT_ENCODING = "base52", | ||
DEFAULT_MAX_LENGTH = 8, | ||
@@ -17,0 +17,0 @@ XXHASH_CONSTRUCT = 0xcafebabe, |
{ | ||
"name": "asset-hash", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Very fast asset hashing function for using e.g. during front-end deployments.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.cjs.js", |
# _Asset Hash_ <br/>[![Sponsored by][sponsor-img]][sponsor] [![Version][npm-version-img]][npm] [![Downloads][npm-downloads-img]][npm] [![Build Status Unix][travis-img]][travis] [![Build Status Windows][appveyor-img]][appveyor] [![Dependencies][deps-img]][deps] | ||
_Asset Hash_ is a quick wrapper around hashing libraries for efficient and fast hashing of asset files like images, web fonts, etc. By default it uses the performance-optimized [xxhash](https://github.com/Cyan4973/xxHash) algorithm. | ||
_Asset Hash_ is a quick wrapper around hashing libraries for efficient and fast hashing of asset files like images, web fonts, etc. By default it uses the performance-optimized [Metrohash](https://github.com/jandrewrogers/MetroHash) and a *Base52* encoding (`[a-zA-Z]`) which works well for file names and urls and has a larger dictionary than when using hex. | ||
@@ -43,2 +43,3 @@ [sponsor-img]: https://img.shields.io/badge/Sponsored%20by-Sebastian%20Software-692446.svg | ||
- `hash`: Any valid hashing algorithm e.g. `metrohash128` (default), `metrohash64`, `xxhash64`, `xxhash32`, `sha1`, `md5`, ... | ||
- `encoding`: Any valid encoding for built-in digests `hex`, `base64`, `base62`, ... | ||
@@ -45,0 +46,0 @@ - `maxLength`: Maximum length of returned digest. Keep in mind that this increases collison probability. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32697
88