suggester
v1.1.7
Published
suggest index
Downloads
10
Readme
Suggester
library for create suggest index
Usage
code
var Suggester = require('suggester');
var suggester = new Suggester();
suggester.add('hello world');
suggester.add('hello city');
suggester.add('hello city');
suggester.add('hello city');
suggester.add('hello village');
suggester.add('hello village');
console.log(suggester.search('hell'));
result
[ 'hello city', 'hello village', 'hello world' ]
Example
Autocomplete for NPM packages
Run server
cd example\web
npm install
PORT=58468 node server.js
Wait
[gap@localhost web]$ PORT=58468 node server.js
info - socket.io started
Downloading data about packages...
Creating suggest index...
Please open http://localhost:58468
Loaded 500 docs
Loaded 1000 docs
...
Open website
xdg-open http://localhost:58468
Result
API
License
MIT Copyright (c) 2015 Yaroslav Gaponov [email protected]