1.1.1 • Published 5 years ago

predictable-hash v1.1.1

Weekly downloads
2
License
MIT
Repository
gitlab
Last release
5 years ago

Small lib that makes predictable hashes out of an array of words

Usage

Without options

const predictableHash = require("predictable-hash")
const hash = predictableHash(["my", "combination"])
// returns 8444-4245-5781-0635

Salting the result

const predictableHash = require("predictable-hash")
const hash = predictableHash(["my", "combination"], { salt: ["S", "A", "L", "T", "Y"] })
// returns 2847-6324-1670-5892

Options

OptionTypeDefaultDescription
saltstring[][]Characters that are pseudo-randomly added between the provided word array
separatorstring-Separator for each group of numbers. If undefined, it will use , instead
1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago