spelling-bee-solver

1.0.0 • Public • Published

webgl-wireframes

This is a solver for the New York Times’ Spelling Bee puzzle.

CLI

Until node fully supports native JavaScript modules, you’ll need to run the CLI with the experimental flag, like so:

$ node --experimental-modules cli.mjs l ofrnug

Note that the first argument (l) is the center letter and the second argument is the surrounding letters.

The output should look like this:

[ 'flog',
  'flong',
  'floor',
  'flor',
  'flour',
  'fluff',
  'flung',
  'fluor',
  'flurr',
  'fool',
  'forlorn',
  'foul',
  'fulgor',
  'fulgour',
  'full',
  'furfurol',
  'furl',
  'furlong',
  'furol',
  'glogg',
  'glug',
  'gluon',
  'golf',
  'googol',
  'gool',
  'grrl',
  'grrrl',
  'gulf',
  'gull',
  'gurl',
  'loglog',
  'logo',
  'logoff',
  'logon',
  'logroll',
  'loll',
  'lolog',
  'long',
  'loof',
  'loofful',
  'loon',
  'loor',
  'lorgnon',
  'lorn',
  'loun',
  'lour',
  'luff',
  'lull',
  'lulu',
  'lung',
  'lungful',
  'noll',
  'nolo',
  'noul',
  'null',
  'nurl',
  'oolong',
  'orlon',
  'oulong',
  'rolf',
  'roll',
  'roul',
  'unfool',
  'unfurl',
  'unroll',
  'urnful' ]

Module

The CLI is powered by a separate function, the usage of which is:

import solve from 'spelling-bee-solver';
 
const solutions = solve('l', ['o', 'f', 'r', 'n', 'u', 'g']);

Readme

Keywords

none

Package Sidebar

Install

npm i spelling-bee-solver

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

3.69 kB

Total Files

6

Last publish

Collaborators

  • adamshaylor