fulfil
v1.0.0
Published
Simple search suggestion using the Levenshtein distance algorithm.
Downloads
13
Maintainers
Readme
fulfil
Simple search suggestion using the Levenshtein distance algorithm.
Install
$ npm install fulfil --save
Usage
var words = require('superb').words;
var fulfil = require('fulfil');
fulfil('batueiful', words).shift(); // beautiful
API
fulfil(input, [suggestions])
Return: array
An array of suggestions sorted by the closest matches found.
keyword
Required
Type: string
Word used to lookup for a suggestion.
suggestions
Type: array
List of suggestions available.
License
MIT © Rafael Rinaldi