node/deps/npm/node_modules/abbrev
isaacs 3ab15cde25 Update npm to 1.1.0-alpha-2 2011-11-22 17:03:58 -08:00
..
lib Include NPM, update .pkg to install it. 2011-11-21 10:50:52 -08:00
LICENSE Update npm to 1.1.0-alpha-2 2011-11-22 17:03:58 -08:00
README.md Include NPM, update .pkg to install it. 2011-11-21 10:50:52 -08:00
package.json Update npm to 1.1.0-alpha-2 2011-11-22 17:03:58 -08:00

README.md

abbrev-js

Just like ruby's Abbrev.

Usage:

var abbrev = require("abbrev");
abbrev("foo", "fool", "folding", "flop");

// returns:
{ fl: 'flop'
, flo: 'flop'
, flop: 'flop'
, fol: 'folding'
, fold: 'folding'
, foldi: 'folding'
, foldin: 'folding'
, folding: 'folding'
, foo: 'foo'
, fool: 'fool'
}

This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.