goofy-names
Generate a deterministic Docker container-like name from a string
Works both in a browser and in Node.js.
~2.8Kb gzip compressed, requires only simple-sha1
.
Uses SHA1 hash for both complete determinism and a very good distribution.
Installation
npm i goofy-names
Usage
const goofyName = require("goofy-names");
const name = goofyName("3ccf40d8-901f-11ed-aaba-c347cf56a42d");
name === "Dreamy Poincare";
import goofyName from "goofy-names";
const name = goofyName("3ccf40d8-901f-11ed-aaba-c347cf56a42d");
name === "Dreamy Poincare";
Copyright
Stolen from the Moby Project while keeping the original Apache License.