human_readable_ids 1.0.0 copy "human_readable_ids: ^1.0.0" to clipboard
human_readable_ids: ^1.0.0 copied to clipboard

A dart plugin to generate human-readable ids from an english lists of nouns and adjectives.

example/human_readable_ids_example.dart

import 'package:human_readable_ids/human_readable_ids.dart';

void main() async {
  /// short hand
  print('id: ${humanReadableId()}');

  /// Longer version
  var generator = HumanReadableIdGenerator();
  print('id: ${generator.generate()}');
  print('id: ${generator.generate()}');

  /// customize the generator
  var stupidGenerator = HumanReadableIdGenerator(
    numericIdsRange: 1,
    nouns: ["john"],
    adjectives: ['genius'],
  );

  print('id: ${stupidGenerator.generate()}');
  assert(stupidGenerator.generate() == stupidGenerator.generate());
}
2
likes
150
pub points
16%
popularity

Publisher

unverified uploader

A dart plugin to generate human-readable ids from an english lists of nouns and adjectives.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on human_readable_ids