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 - npm Package Compare versions

Comparing version 0.5.4 to 0.6.0

11

lib/options.js

@@ -19,3 +19,12 @@ 'use strict';

if (value === 'file') {
(0, _utils.validateJSONPath)(params[params.length - 1]);
var path = params[params.length - 1];
if (Array.isArray(path)) {
params.pop();
path.forEach(function (file) {
(0, _utils.validateJSONPath)(file);
params.push(file);
});
} else {
(0, _utils.validateJSONPath)(params[params.length - 1]);
}
} else {

@@ -22,0 +31,0 @@ params.pop();

8

package.json
{
"name": "node-jq",
"version": "0.5.4",
"version": "0.6.0",
"description": "Run jq in node",

@@ -61,8 +61,6 @@ "main": "lib/jq.js",

"babel-register": "^6.9.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chai": "^4.0.1",
"codeclimate-test-reporter": "^0.4.1",
"coveralls": "^2.11.9",
"dirty-chai": "^1.2.2",
"husky": "^0.13.1",
"husky": "^0.14.0",
"isparta": "^4.0.0",

@@ -69,0 +67,0 @@ "mocha": "^3.2.0",

@@ -108,2 +108,15 @@ <p align="center">

#### `input: 'file'`
Run jq query against multiple **JSON files**.
```js
jq.run('.', ['/path/to/file.json','path/to/other_file.json']).then(console.log)
// {
// "foo": "bar"
// }
// {
// "otherFoo": "andBar"
// }
```
#### `input: 'json'`

@@ -110,0 +123,0 @@

@@ -12,3 +12,12 @@ import { validateJSONPath } from './utils'

if (value === 'file') {
validateJSONPath(params[params.length - 1])
let path = params[params.length - 1]
if (Array.isArray(path)) {
params.pop()
path.forEach((file) => {
validateJSONPath(file)
params.push(file)
})
} else {
validateJSONPath(params[params.length - 1])
}
} else {

@@ -15,0 +24,0 @@ params.pop()

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