New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

org.webjars.npm:rev-hash

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.npm:rev-hash

WebJar for rev-hash

2.0.0
Source
Maven
Version published
Maintainers
1
Source

rev-hash Build Status

Create a hash for file revving

It will create an md5 hash from an input buffer or string, and truncate it to 10 characters, which is unique enough for this purpose.

If you think you need a different hash algorithm or a longer hash, you're wrong.

Install

$ npm install rev-hash

Usage

const fs = require('fs');
const revHash = require('rev-hash');

revHash(fs.readFileSync('unicorn.png'));
//=> 'bb9d8fe615'

revHash('Lorem ipsum dolor sit amet');
//=> 'fea80f2db0'

API

revHash(input)

input

Type: Buffer string

Data to create a hash from.

License

MIT © Sindre Sorhus

FAQs

Package last updated on 24 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts