jerry-quotient

1.0.0-alpha • Public • Published

jerry-quotient

Build Status

A simple jq wrapper for node.js so you can require it in your projects. Vaguely based on node-jq.

Install

$ npm i jerry-quotient

Usage

jerry-quotient exports a single function which can be used like this:

const jq = require('jerry-quotient')
 
jq('.hello', {hello:'world'}).then((result) => {
    // result === 'hello'
})

Here is some more detail:

jq(filter, json) -> result

  • filter: A string that will be interpreted as a jq filter.
  • json: A string or object that the jq command will evaluate through the filter. If passed as an object, the parameter will be stringified before being evaluated.
  • result: A string that represents the result of the evaluation.

Testing

$ npm test

To get coverage stats, try using nyc:

$ npx nyc npm test

Contributions

All contributions are welcome: bug reports, feature requests, "why doesn't this work" questions, patches for fixes and features, etc. For all of the above, file an issue or submit a pull request.

License

Apache-2.0

Readme

Keywords

Package Sidebar

Install

npm i jerry-quotient

Weekly Downloads

0

Version

1.0.0-alpha

License

Apache-2.0

Unpacked Size

6.34 kB

Total Files

8

Last publish

Collaborators

  • garbados