New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-jq

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-jq

Run jq in node

  • 0.3.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72K
increased by2.95%
Maintainers
1
Weekly downloads
 
Created
Source

node-jq logo

node-jq is a wrapper for jq - a lightweight and flexible command-line JSON processor.


Installation

npm install node-jq --save

jq is not required. If it doesn't exist, the latest version of jq is installed in the node_modules/.bin/ folder.

Usage

import { run } from 'node-jq'
// or
const { run } = require('node-jq')

const filter = '. | map(select(.foo > 10))'
const jsonPath = '/path/to/json'
const options = {}

run(filter, jsonPath, options)
  .then((output) => {
    console.log(output)
    // something with the output
  })
  .catch((err) => {
    console.error(err)
    // something with the error
  })

Options

OptionTypeDefaultValuesDescription
inputString'file''file', 'json', 'string'Specify the type of input
outputString'pretty''json', 'string', 'pretty'Specify the type of output

How to use this?

We use it ourselves in an Atom plugin. Check it out: atom-jq

License

MIT

Keywords

FAQs

Package last updated on 06 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc