Skip to content

Latest commit

 

History

History
88 lines (55 loc) · 1.67 KB

readme.md

File metadata and controls

88 lines (55 loc) · 1.67 KB

levenmorpher

Build Coverage Downloads Size

A JavaScript function and command-line tool that morphs one word into another, one letter-change at a time.

It uses a very liberal English word list. It might be nice to use something less permissive to avoid really obscure words that basically no one’s ever heard of.

Install

npm:

npm install levenmorpher

API

var levenmorpher = require('levenmorpher')

console.log(levenmorpher('ruby', 'node'))

Yields:

['ruby', 'rube', 'robe', 'rode', 'node']

CLI

Usage: levenmorpher [options] <word> <word>

Morph one word into another, one letter at a time

Options:

  -h, --help           output usage information
  -v, --version        output version number

Usage:

# output distance
$ levenmorpher ruby node
ruby
rube
robe
rode
node

License

MIT © Zeke Sikelianos