0.1.6 • Published 9 years ago

query-monster v0.1.6

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

query-monster

Build Status

A simple tool for building search queries for Javascript on the client or server side.

Returns an object containing terms, filtered for stopwords, and an array of exact phrases from single or double quotes.

Installing

npm i --save query-monster

In Browser

<script src="../dist/query-monster.js"></script>
<script>
  var monsta = queryMonster;
</script>

In Node

var monsta = require('query-monster');

Usage

var result = monsta.crush('new habanero pizza at "pizza hut"');

Result

{
  "query": "new habanero pizza at \"pizza hut\"",
  "phrases": [
    "pizza hut"
  ],
  "terms": [
    "habanero",
    "pizza"
  ]
}

Dependencies

lodash for _.reject

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago