rev-hash

WebJar for rev-hash

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

rev-hash
Последняя версия

Последняя версия

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

rev-hash
WebJar for rev-hash
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/sindresorhus/rev-hash

Скачать rev-hash

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/rev-hash/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>rev-hash</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/rev-hash/
implementation 'org.webjars.npm:rev-hash:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/rev-hash/
implementation ("org.webjars.npm:rev-hash:2.0.0")
'org.webjars.npm:rev-hash:jar:2.0.0'
<dependency org="org.webjars.npm" name="rev-hash" rev="2.0.0">
  <artifact name="rev-hash" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='rev-hash', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "rev-hash" % "2.0.0"
[org.webjars.npm/rev-hash "2.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

rev-hash

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 revisionHash = require('rev-hash');

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

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

API

revisionHash(input)

input

Type: Buffer | string

Data to create a hash from.

Версии библиотеки

Версия
2.0.0