goofy-names
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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";
// Your bundler must handle JSON (it is usually the case)
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.

Readme

Keywords

Package Sidebar

Install

npm i goofy-names

Weekly Downloads

31

Version

1.0.0

License

Apache-2.0

Unpacked Size

19.2 kB

Total Files

9

Last publish

Collaborators

  • mmomtchev