Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jipe

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jipe - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

6

inquiry.js

@@ -7,2 +7,3 @@ var util = require('util');

var debug = require('debug')('jipe.inquiry');
var pp = require('./pp');

@@ -24,3 +25,6 @@ function InquiryStream(options) {

var output = this._query(input);
if (output.length == 1) {
if (output.length === 1 && output[0] === null) {
debug('output: null');
this.push(pp.NULL);
} else if (output.length === 1) {
debug('output: %j', output[0]);

@@ -27,0 +31,0 @@ this.push(output[0]);

11

jsonpath.js

@@ -5,2 +5,3 @@ var util = require('util');

var pp = require('./pp');
var jevel = require('JSONPath').eval;

@@ -28,7 +29,11 @@ var debug = require('debug')('jipe.jsonpath');

var output = this._query(input);
if (output.length == 1) {
debug('output: %j', output[0]);
debug('output: %j', output);
if (output.length === 1 && output[0] === null ) {
debug('writing: null');
this.push(pp.NULL);
} else if (output.length === 1) {
debug('writing: %j', output[0]);
this.push(output[0]);
} else if (output.length > 1) {
debug('output: %j', output);
debug('writing: %j', output);
this.push(output);

@@ -35,0 +40,0 @@ }

{
"name": "jipe",
"version": "0.0.6",
"version": "0.1.0",
"description": "Filter, extract from and pretty print a stream of JSON objects.",

@@ -33,7 +33,7 @@ "main": "index.js",

"dependencies": {
"JSONPath": "^0.10.0",
"debug": "~0.7.4",
"inquiry": "0.0.2",
"optimist": "~0.6.0",
"inquiry": "0.0.2",
"underscore": "~1.5.2",
"JSONPath": "~0.9.1"
"underscore": "~1.5.2"
},

@@ -40,0 +40,0 @@ "devDependencies": {

@@ -24,7 +24,15 @@ var util = require('util');

JSONPrintStream.prototype._transform = function(obj, _, done) {
debug('printing %j', obj);
this.push(JSON.stringify(obj, null, this._indent) + '\n');
if (obj !== JSONPrintStream.NULL) {
debug('printing %j', obj);
this.push(JSON.stringify(obj, null, this._indent) + '\n');
} else {
debug('printing null');
this.push('null\n');
}
done();
};
/* null placeholder since passing in null ends the stream */
JSONPrintStream.NULL = new Object();
module.exports = JSONPrintStream;
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