Skip to content
/ quri-js Public
forked from trycatchjames/quri-js

JS wrapper for the QURI string specification

License

Notifications You must be signed in to change notification settings

vdh/quri-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quri-js

NPM version Build Status Coveralls Status Dependency Status Downloads

JS wrapper for the QURI string specification

Install

npm i -D quri

QURI Spec

More information about the QURI specification and parser is available here.

Usage

Basic example

import Criteria from "quri";

let criteria = new Criteria();

criteria.toString(); // "field_1".eq("my value")

Nested example

let criteria = new Criteria();
criteria.appendExpression('field_1', '==', 'outer');

let nestedCriteria = new Criteria('or');
nestedCriteria.appendExpression('field_2', 'like', 'nested%');
nestedCriteria.appendExpression('field_3', 'in', [1,2,3,4]);

criteria.appendCriteria(nestedCriteria);

criteria.toString();
// "field_1".eq("outer"),("field_2".eq("nested%")|"field_3".in(1,2,3,4))

License

MIT © theHarvester

About

JS wrapper for the QURI string specification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%