@iprg/docker-name-generator

1.0.8 • Public • Published

Docker Name Generator

This is a great simple docker name generator

This package generate random names same as docker

features

  • you can generate name in any parts you need (example 2 part:"red_car" or four: "red_car_big_house" but use odd parts not recommended)
  • you can customize separator (by default is "_" but you can change)

Usage

import dockerNameGenerator from '@iprg/docker-name-generator'
// or you can use require => const dockerNameGenerator = require('@iprg/docker-name-generator')

console.log('name: ', dockerNameGenerator()) // => red_car

Customize

You can customize generated name same as below

// change parts count
console.log('name: ', dockerNameGenerator(4)) // => red_car_big_house

// change parts count and separator
console.log('name: ', dockerNameGenerator(4, '-')) // => blue-spoon-small-boy

// change separator without change default parts count
console.log('name: ', dockerNameGenerator(undefined, '-')) // => blue-spoon

Package Sidebar

Install

npm i @iprg/docker-name-generator

Weekly Downloads

13

Version

1.0.8

License

Apache-2.0

Unpacked Size

53.2 kB

Total Files

4

Last publish

Collaborators

  • rajabzadehm43