friendly-username-generator
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

ts

Friendly Username Generator

Tired of accidentally generating explicit usernames? Well fear no longer. This module will put your boss at ease by generating friendly usernames.

Importing

const { generateUsername } = require('friendly-username-generator');

// or

import { generateUsername } from 'friendly-username-generator';

Usage

// Structure: (adjective-animal<random 3-digit number>)
generateUsername(); // --> "yellow-zebra596" 

Options

You may pass options to generateUsername

const options = {
  useHyphen: Boolean,         // if false, a hyphen will NOT be used. (True by default)
  useRandomNumber: Boolean    // if false, a random number will NOT be appended to the end of the random username. (True by default)
}

Other Perks

  • Zero dependancies! This module will use only native code. (Except for jest so I can write tests)
  • Frequent updates to word lists.
  • Typescript!

Enjoy the package?

If you'd like to support me, buy me a coffee!

Readme

Keywords

none

Package Sidebar

Install

npm i friendly-username-generator

Weekly Downloads

3,215

Version

2.0.4

License

MIT

Unpacked Size

39.6 kB

Total Files

15

Last publish

Collaborators

  • ezmacnsteeze