🐋 Docker Names
Docker_Names 🐋 is a port for Moby's name generation for the Deno ecosystem.
With this library you'll be able to generates names like:
- ecstatic_rubin
- elastic_yonath66
- blissful@elgamal
- boring&wozniak2
💭 Inspiration
This project is inspired by the awesome folks at moby/moby and their idea to pay homage to great scientists and "hackers" when creating names for running containers.
This also builds on my previous port for the .NET Core ecosystem DockerNames.
▶ Quickstart
Import this project and you'll have access to two functions:
generateName(retry?: int)
: Generates a name with an adjective, a personality and a_
separator. If retry is set and greated than 0 it'll be appendedgenerateNameCustom(seprator: string, retry?: int)
: Same asgenerateName
but allows for a custom separator.
Sample
This snippet will allow you to use deno repl
to play with name generation:
> let names;
// undefined
// Importing our mod into the REPL
> import("./mod.ts").then(r => names = r)
// Promise { <pending> }
> names.generateName()
// magical_satoshi
> names.generateName(22)
// flamboyant_goldberg22
> names.generateNameCustom('***')
// vigorous***bohr
> names.generateNameCustom('***', 99)
// objective***jennings99