bone.io-textsearch
v0.1.3
Published
Get that nice "Google" style search, without the billion dollar investment.
Downloads
10
Readme
Bone.io Textsearch
Get that nice "Google" style search, without the billion dollar investment.
In the browser
In the head do this:
<script src="/bone.io-textsearch.js"></script>
<script>
bone.modules.TextSearch = bone.modules.textsearch(options)
</script>
You can pass in the following options:
selector
- The selector that designates textsearch boxes.lookup
- A view action that decides what data to send to the server.inboundMiddleware
- Inbound bone.io middleware.outboundMiddleware
- Outbound bone.io middleware.
Then create as many textsearch boxes as you want in your html like this:
<input type="text", data-ui="textsearch" />
In node
require('bone.io-textsearch');
// Rockout with your cock out
bone.modules.textsearch(options);
You can supply the following options
:
search
- Data route that receives two argumentsdata
, andcontext
.inboundMiddleware
- Array of inbound bone.io middleware functions.outboundMiddleware
- Array of outbound bone.io middleware functions.