nordpeak/random-names-generator

Small library that generates a Docker like random name from the list of adjectives and surnames of famous people in the science and tech world.

1.0.3 2020-08-09 12:00 UTC

This package is auto-updated.

Last update: 2024-11-16 23:14:43 UTC


README

Small library that generates a Docker like random name from the list of adjectives and surnames of famous people in the science and tech world.

Examples

  • inspiring-wozniak
  • nifty-einstein
  • nervous.carson
  • goofy-cartwright-93
  • dazzling.austin.12837

Installation

This package uses composer so you can just add nordpeak/random-names-generator as a dependency to your composer.json file or execute the following command:

composer require nordpeak/random-names-generator

Usage

Nothing too fancy here.

use Nordpeak\NamesGenerator;

// default behaviour
NamesGenerator::generate(); // => "inspiring-wozniak"

// change delimiter 
NamesGenerator::generate(["delimiter" => "."]); // => "nifty.einstein"
  
// with additional random token 
NamesGenerator::generate(["token" => 5]); // => "quirky-hoover-82736"

Options

The following options are available:

NamesGenerator::generate([
  "delimiter" => "-",
  "token" => 4
]);

Credits

Heavily inspired and sourced from the docker namesgenerator library.

https://github.com/moby/moby/tree/master/pkg/namesgenerator

Code and setup based on atrox/haikunator library.

https://packagist.org/packages/atrox/haikunator