words / levenmorpher

Morph one word into another, one letter at a time
MIT License
18 stars 4 forks source link
en english fun game levenshtein morph word

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