开发者社区> 镜像站> NPM> name-me
name-me
Tool to come up with a free package name on NPM
Last updated 6 years ago by cwmma .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install name-me 
SYNC missed versions from official npm registry.

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);
});

Current Tags

  • 0.4.2                                ...           latest (6 years ago)

7 Versions

  • 0.4.2                                ...           6 years ago
  • 0.4.1                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (1)
Dependents (1)