predictable-hash
v1.1.1
Published
A simple way to make a number hash out of words
Readme
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-0635Salting the result
const predictableHash = require("predictable-hash")
const hash = predictableHash(["my", "combination"], { salt: ["S", "A", "L", "T", "Y"] })
// returns 2847-6324-1670-5892Options
| Option | Type | Default | Description |
|-------------|----------|---------|-----------------------------------------------------------------------------|
| salt | string[] | [] | Characters that are pseudo-randomly added between the provided word array |
| separator | string | - | Separator for each group of numbers. If undefined, it will use , instead |
