heh-cool-codename
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Heh, Cool Codename.

BRUH.

CodeNames

We just really like naming our releases cool codenames like "DesertFox" or "AcrticJaguar" or "RushMonkey". So we decided to turn this into a tiny really lame npm module.

It's also super helpful to users when resources have a nice name to be called with by default. Good UX is sexy. (Which actually happens to be the real reason we built this.)

Installation

Run one of these commands.

npm install heh-cool-codename --save

or if you're using yarn (which you should be)

yarn add heh-cool-codename

Usage

It exports just one function. That takes one argument. A number. The same number returns the same codename. Pass in a random number or pass in a hash. Which ever you prefer.

There are a total of 110^2 possible codenames.

import * as codename from 'heh-cool-codename';

codename(983456); // ['Solar', 'Crane']

Yes, it returns an Array. We don't know your usecase so we believe this is best. Besides turning it into a string is trivial.

// "LambdaRacoon"
codename(345665).join(''); 

// "lambda-racoon"
codename(345665)
	.map(name => name.toLowerCase())
    .join('-');

CLI

Yeah, we threw that in for fun. Install globally for use.

Run it as is for a random codename.

heh-cool-codename

or pass in a seed number to get a specific codename.

heh-cool-codename 42

Output: Desert Croc

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i heh-cool-codename

      Weekly Downloads

      0

      Version

      1.0.2

      License

      MIT

      Last publish

      Collaborators

      • omranjamal