npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

codename-add-words

v0.0.4

Published

Codename generator

Downloads

1

Readme

Codename generator

Generates codenames. What for, you ask?

Installation

$ npm install -g codename

Usage

From node,

var codename = require('codename')();

var filters = ['alliterative', 'random'],
    lists = ['crayons', 'adjectives', 'cities', 'animals'],
    myName = codename.generate(filters, lists);

Options

codename.generate takes two options: filters and lists.

  • filters (Array[String|Function]) - describes a set of filters that should be used to reduce each list to a single word

  • lists - (Array[String|Array]) - the names or contents of the lists to use for selecting names

From the CLI,

All arguments are forwarded from comma-delimited strings:

$ codename \
  --lists=crayons,adjectives,cities,animals \
  --filters=alliterative,unique,random

Writing Filters

Each filter takes a memo listing any other words selected followed by the list of words the filter should be applied to. For instance, a filter to limit results to words containing the letter j:

var letterJFilter = function (memo, words) {
  return words.filter(function (w) {
    return w.toLowerCase().indexOf('j') > -1;
  });
};

Alternatively, a filter may return a single word that should be added to the name. These filters are output filters, and they should only be used at the end of a filter list.

Filters may be contributed to src/filters or supplied as function arguments to codename.generate.

Word Lists

  • Adjectives from http://www.keepandshare.com/doc/12894/adjective-list
  • Animals from http://en.wikipedia.org/wiki/Lists_of_animals
  • Cities from http://answers.google.com/answers/threadview?id=596822
  • Crayons from http://www.colourlovers.com/web/blog/2008/04/22/all-120-crayon-names-color-codes-and-fun-facts

License

  • word lists (c) their respective authors
  • codename released under the WTFPL