s.neptune

1.0.1 • Public • Published

neptune Build Status

Super small full-text search for JavaScript.

Why

Neptune was build to make it ease to add simple text search to your application, without relying in big'n'complex solutions out there.

Neptune is perfect if you need to build a search field for a collection of data. It can find the matching criteria within a string and also highlights the matching substring for the whole collection you've provided. Capitalization remains untouched.

Getting Started

Grab it from npm

$ npm install --save s.neptune

Require it and build your engine based on your data collection

var neptune = require('s.neptune')
  , request = require('kakuna')
 
request
  .get('/api/pet')
  .end()
  .then((res) => neptune(res.body))
  .then((engine) => engine.search('bob'))
  .then((results) => console.log(results)) 
 
  /* => results: [{[{ content:"Big",
                      highlight: false  },{
                      content:"Bob",
                      highlight:true
                  }]}]
  */
 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i s.neptune

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jugoncalves