Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including abbrev with all npm packages installed. Try it out:

var abbrev = require("abbrev")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

abbrev v1.1.1

Like ruby's abbrev module, but in js

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.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free