unscrambler

1.2.5 • Public • Published

Unscrambler

The unscrambler function takes a single String as an argument. It is recommended that a string with length no longer than 8 characters is used, as the run time is dramatically increased.

Running the function with a string argument will return an object with properties '2 letters' up to 'n letters', where n is the length of the string. The value of each of these properties is an array that holds strings of the specified length. Before a string is placed in an array it is checked against a list of english-language words. Only existing words are placed in the array.

const unscrambler = require('unscrambler')
// OR
import unscrambler from 'unscrambler'

const scrambledEggs = unscrambler('eggs')
// scrambledEggs will equal...
{
  '2 letters': [ 'es' ],
  '3 letters': [ 'egg', 'seg' ],
  '4 letters': [ 'eggs' ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i unscrambler

Weekly Downloads

1

Version

1.2.5

License

ISC

Unpacked Size

3.94 kB

Total Files

6

Last publish

Collaborators

  • nsars19