psq

0.0.3 • Public • Published

psq

psq (parse search query) converts a search query into JSON

build status

Requirements

Install

  • npm install psq

Example

var psq = require('psq')
 
console.log(psq('"hello world" -python +example'))
{
    "exclude": {
        "labels": {},
        "words": [
            "python"
        ]
    },
    "include": {
        "labels": {},
        "words": [
            "hello world",
            "example"
        ]
    }
}

Author

TODO

  • Documentation
  • Add flags for HTML escaping/stripping and URL encoding/decoding

CHANGELOG

0.0.3

  • Added support for terms when they contain a dash
  • Words inside quotes will now have quotes stripped in results

0.0.2

  • Fixed return object (now returns JSON)
  • Added example

0.0.1

  • Initial Release

LICENSE

  • MIT

Readme

Keywords

none

Package Sidebar

Install

npm i psq

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • swang