![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | LICENSE | 2 years ago | 2.0K | |
![]() | README.md | 2 years ago | 499 | 9b1f1b9 rm old utils [كارل مبارك] |
![]() | abbrev.js | 2 years ago | 1.7K | |
![]() | package.json | 2 years ago | 509 | 2324c9f added npm start script [كارل مبارك] |
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.