Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npm/abbrev-js
Like ruby's Abbrev module
https://github.com/npm/abbrev-js
npm-cli
Last synced: about 1 month ago
JSON representation
Like ruby's Abbrev module
- Host: GitHub
- URL: https://github.com/npm/abbrev-js
- Owner: npm
- License: other
- Created: 2010-03-09T21:16:26.000Z (over 14 years ago)
- Default Branch: main
- Last Pushed: 2024-05-03T20:55:09.000Z (6 months ago)
- Last Synced: 2024-05-16T18:13:42.400Z (6 months ago)
- Topics: npm-cli
- Language: JavaScript
- Homepage:
- Size: 96.7 KB
- Stars: 164
- Watchers: 14
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# abbrev-js
Just like [ruby's Abbrev](http://apidock.com/ruby/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.