Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asset-hash

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-hash - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

lib/index.cjs.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc