bloodhound-js-with-request-headers-support
v0.0.3
Published
bloodhound.js with request header support for node and browser
Downloads
7
Maintainers
Readme
bloodhound-js-with-request-headers-support
Bloodhound is the typeahead.js suggestion engine. Bloodhound is robust, flexible, and offers advanced functionalities such as prefetching, intelligent caching, fast lookups, and backfilling with remote data.
Installtion
npm install bloodhound-js-with-request-headers-support --save
Changes
- no jquery deps
- works with both browser and node
- jquery deferred with es6-promise
- storage polyfill with storage2
- ajax with superagent
- now with request header support!
Usage
var Bloodhound = require('bloodhound-js-with-request-headers-support');
var engine = new Bloodhound({
local: ['dog', 'pig', 'moose'],
queryTokenizer: Bloodhound.tokenizers.whitespace,
datumTokenizer: Bloodhound.tokenizers.whitespace
});
var promise = engine.initialize();
promise.then(function() {
console.log('engine init done');
engine.search(
'd',
function(d) {
console.log(d);
},
function(d) {
console.log(d);
}
);
});
License
MIT