suggester

1.1.7 • Public • Published

Suggester Build Status

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

alt text

API

api.md

License

MIT Copyright (c) 2015 Yaroslav Gaponov yaroslav.gaponov@gmail.com

Readme

Keywords

Package Sidebar

Install

npm i suggester

Weekly Downloads

0

Version

1.1.7

License

MIT

Last publish

Collaborators

  • yaroslavgaponov