Newfangled Package Modernizer
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    psqpublic

    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

    Keywords

    none

    install

    npm i psq

    Downloadsweekly downloads

    12

    version

    0.0.3

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar