fulfil

1.0.0 • Public • Published

fulfil Build Status

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

Package Sidebar

Install

npm i fulfil

Weekly Downloads

13

Version

1.0.0

License

MIT

Last publish

Collaborators

  • rafaelrinaldi