• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    PHP
  • License
    BSD 3-Clause "New...
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate Heroku-like random names to use in your php applications.

HaikunatorPHP

Build Status Latest Version Coverage Status

Generate Heroku-like random names to use in your PHP applications.

Installation

composer require atrox/haikunator

Usage

Haikunator is pretty simple.

use Atrox\Haikunator;

// default usage
Haikunator::haikunate() // => "wispy-dust-1337"

// custom length (default=4)
Haikunator::haikunate(["tokenLength" => 6]) // => "patient-king-887265"

// use hex instead of numbers
Haikunator::haikunate(["tokenHex" => true]) // => "purple-breeze-98e1"

// use custom chars instead of numbers/hex
Haikunator::haikunate(["tokenChars" => "HAIKUNATE"]) // => "summer-atom-IHEA"

// don't include a token
Haikunator::haikunate(["tokenLength" => 0]) // => "cold-wildflower"

// use a different delimiter
Haikunator::haikunate(["delimiter" => "."]) // => "restless.sea.7976"

// no token, space delimiter
Haikunator::haikunate(["tokenLength" => 0, "delimiter" => " "]) // => "delicate haze"

// no token, empty delimiter
Haikunator::haikunate(["tokenLength" => 0, "delimiter" => ""]) // => "billowingleaf"

// custom nouns and/or adjectives
Haikunator::$ADJECTIVES = ["red", "green", "blue"];
Haikunator::$NOUNS = ["reindeer"];
Haikunator::haikunate(); // => "blue-reindeer-4252"

Options

The following options are available:

Haikunator::haikunate([
  "delimiter" => "-",
  "tokenLength" => 4,
  "tokenHex" => false,
  "tokenChars" => "0123456789"
]);

// get/set nouns or adjectives
Haikunator::$ADJECTIVES
Haikunator::$NOUNS

If tokenHex is true, it overrides any tokens specified in tokenChars

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

Other Languages

Haikunator is also available in other languages. Check them out:

More Repositories

1

haikunatorjs

Generate Heroku-like random names to use in your node applications.
TypeScript
250
star
2

github-actions-badge

🛡️ Shields.io Badge for your GitHub Actions
Go
191
star
3

haikunatorpy

Generate Heroku-like random names to use in your python applications
Python
120
star
4

haikunatorgo

Generate Heroku-like random names to use in your go applications.
Go
52
star
5

sweetify-django

SweetAlert integration for Django
Python
47
star
6

haikunatorjava

Generate Heroku-like random names to use in your Java applications
Java
28
star
7

haikunator.net

Generate Heroku-like random names to use in your .NET applications
C#
23
star
8

sweetify

SweetAlert flash messages for Ruby on Rails
Ruby
21
star
9

codecov-action

A GitHub action that sends your code coverage to codecov.io
Dockerfile
8
star
10

haikunatordart

Generate Heroku-like random names to use in your dart applications
Dart
8
star
11

cain

📜 CAIN - Simple Media Management
Go
5
star
12

sync-dotenv

🔀 Keep your .env.example in sync with changes to your .env file
Go
5
star
13

homedir

Go library for detecting and expanding the user's home directory
Go
4
star
14

steam-account-switcher

simple steam account switcher that lives in your taskbar
Go
3
star
15

go-migrate-rice

rice source driver for golang-migrate/migrate
Go
3
star
16

tower-helmet

tower-helmet helps you secure your tower server by setting various HTTP headers. It's not a silver bullet, but it can help!
Rust
2
star
17

dotenv-build

dotenv-build helps you to supply your .env file as compile time environment variables in your build.rs
Rust
2
star
18

box

📦 BOX - cli boxes
Go
1
star
19

env

a tiny .env wrapper
Go
1
star
20

mailgen

Mailgen: Rust crate that generates clean, responsive HTML and text e-mails for sending transactional mail
Rust
1
star
21

haikunatorperl

Generate Heroku-like random names to use in your perl 6 applications.
Perl 6
1
star