Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including name-me with all npm packages installed. Try it out:

var nameMe = require("name-me")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

name-me v0.4.2

Tool to come up with a free package name on NPM

name-me Build Status

Comes up with a random name that is free on NPM.

npm install -g name-me

CLI

name-me [name]

takes an optional argument for a name to work with

Options are

  • --length or -l which sets a max length from the dictionary (default 6).
  • --package or -p which modifies the package.json of the current directory to use the generated name.

Examples:

$ name-me
quipus
$ name-me ajax
ajax-js
$ name-me -p
# adds it to the package.js
$ name-me -l 3
node-oy

node

var nameMe = require('name-me');

takes 2 arguments both optional, a name to work with, which if available will be returned, or if not available will be 'improved' also takes a number which specifies max length of random words to get from the dictionary, returns a promise.

nameMe().then(function (name) {
  console.log(name);
});
nameMe(2).then(function (name) {
  //build with max 3 letter words
  console.log(name);
});
nameMe(ajax).then(function (name) {
  //build around 'ajax' which isn't available
  console.log(name);
});

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free