Skip to content
/ qqq-q Public

A search string parsing and stringifying library

Notifications You must be signed in to change notification settings

eggggger/qqq-q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qqq-q

Build Status

A search string parsing and stringifying library

Supports

  • q=string
  • q=string field:content
  • q=string model.field:content
  • q="string" field:content
  • q="string" field:content>value

Installation

npm install qqq-q

Test

npm test

Usage

var q = require('qqq.q');
var assert = require('assert');

var obj = q.parse('"a:xxx" b:xxx c.d:>=10');
assert.deepEqual(obj, {
  "_content": "a:xxx",
  "b": "xxx",
  "c": {
    "d": {
      "$gte": "10"
    }
  }
});

var str = qs.stringify(obj);
assert.equal(str, '"a:xxx" b:xxx c.d:>=10');

License

MIT

About

A search string parsing and stringifying library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published