1
0
Fork 0
mirror of https://github.com/MillironX/docker-names.git synced 2024-12-21 17:48:18 +00:00
A docker name generator in TypeScript.
Find a file
2021-08-31 12:15:16 -05:00
.github/workflows Adding actions to ensure tests pass (#13) 2021-05-11 09:52:11 -07:00
src Merge branch 'main' of https://github.com/criblio/docker-names into criblio-main 2021-08-31 12:14:33 -05:00
.gitignore Improving build and release (#19) 2021-07-26 17:37:58 -07:00
.nvmrc Improving build and release (#19) 2021-07-26 17:37:58 -07:00
jest.config.js Initial commit 2021-04-25 10:29:08 -05:00
package-lock.json Improving build and release (#19) 2021-07-26 17:37:58 -07:00
package.json Improving build and release (#19) 2021-07-26 17:37:58 -07:00
README.md Personalize README.md 2021-07-20 11:31:10 -05:00
tsconfig.json Initial commit 2021-04-25 10:29:08 -05:00

Docker Names

An implementation of docker-names in TypeScript. Forked from https://github.com/criblio/docker-names.

Changes

  1. Added more names of scientists related to
    • chemical engineering
    • animal breeding
    • rumen science
    • among others...
  2. Changed the delimiter back to an underscore
  3. Added an identifier that starts with a date (useful where identifiers have to be sorted chronologically).

Usage

Maybe this stuff will still work? 🤷 I just replaced everything with my name and code, but I personally transpile to JavaScript rather than use TypeScript directly.

Generate Name

import {generateName} from '@millironx/docker-names'

const dockerName = generateName();

console.log(dockerName);

//Outputs goofy_panini

Generate Name With Number

import {generateNameWithNumber} from '@millironx/docker-names'

const dockerName = generateNameWithNumber();

console.log(dockerName);

//Outputs goofy_panini_4

Generate Name With Date

import {generateNameWithDate} from '@millironx/docker-names'

const dockerName = generateNameWithDate();

console.log(dockerName);

//Outputs 20210720_goofy_panini

Words

The words can also be imported from the package if need be.

import {left,right} from '@millironx/docker-names'

console.log(left);

//Outputs [admiring,adoring, etc...]

console.log(right)

//Outputs [albattani,allen, etc...]