sitelock-holmes

1.2.0 • Public • Published

Sitelock Holmes.js

npm version Build Status

Sitelock Holmes.js is a simple, easy to use both browser and Node.JS module for implementing a pure javascript site search for your page.

Latest Release: v1.2.0 Watson

Example:

Server

var ss = require('sitelock-holmes');
var sitesearch = new ss(['http://facekapow.github.io','http://facekapow.github.io/sitelock-holmes.js/']);
sitesearch.search('under');
sitesearch.on('results',function(results) {
  //Returns array of result array, one per page.
  for (var i = 0; i < results.length; i++) {
  var result = results[i];
    //Now we have an array of results, let's iterate it:
    for (var j = 0; j < result.length; j++) {
      var currentResult = result[j];
      console.log(currentResult);
    }
  }
});

Package Sidebar

Install

npm i sitelock-holmes

Weekly Downloads

2

Version

1.2.0

License

GPL V3.0

Last publish

Collaborators

  • facekapow