Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heh-cool-codename

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heh-cool-codename

Cool codenames to make you feel cool (and other less important UX reasons)

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 24 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc