haikunator 0.1.0 copy "haikunator: ^0.1.0" to clipboard
haikunator: ^0.1.0 copied to clipboard

Dart 1 only

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

HaikunatorDART #

Build Status Latest Version

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

Installation #

Add the following to your pubspec.yaml and run pub get:

dependencies:
  haikunator: any

Usage #

Haikunator is pretty simple.

import 'package:haikunator/haikunator.dart';

// 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"

Options #

The following options are available:

Haikunator.haikunate(
  delimiter: "-",
  tokenLength: 4,
  tokenHex: false,
  tokenChars: "0123456789"
);

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:

1
likes
40
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

Documentation

License

BSD-3-Clause (license)

More

Packages that depend on haikunator