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

stream-stringify

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-stringify - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

18

lib/stream-stringify.js

@@ -118,3 +118,4 @@ // Generated by CoffeeScript 1.9.2

this.first = false;
return this.op + (this.prettyFormat ? "\n" + this.tabCharacter : "") + data;
data = this.op + (this.prettyFormat ? "\n" + this.tabCharacter : "") + data;
return data;
} else {

@@ -146,3 +147,3 @@ return this.sep + (this.prettyFormat ? "\n" + this.tabCharacter : "") + data;

StreamStringify.prototype._writeNestPrefix = function(key) {
StreamStringify.prototype._specifyNestPrefix = function(key) {
if (key != null) {

@@ -153,3 +154,3 @@ if (this.type === "Array") {

}
this.write(this._applySeparator(this._keyPrefix(key)));
this.initialData = this._applySeparator(this._keyPrefix(key));
} else {

@@ -160,3 +161,3 @@ if (this.type === "Object") {

}
this.writeElement('');
this.initialData = this._applySeparator(this._formatEntity(''));
}

@@ -167,3 +168,3 @@ return true;

StreamStringify.prototype.startNewObject = function(key) {
if (this._writeNestPrefix(key)) {
if (this._specifyNestPrefix(key)) {
return this._beginNewStream("Object");

@@ -174,3 +175,3 @@ }

StreamStringify.prototype.startNewArray = function(key) {
if (this._writeNestPrefix(key)) {
if (this._specifyNestPrefix(key)) {
return this._beginNewStream("Array");

@@ -191,2 +192,3 @@ }

newStream.isNested = true;
newStream.op = this.initialData + newStream.op;
return newStream;

@@ -239,3 +241,3 @@ };

if (!this.stopped) {
if (this.outputEmpty) {
if (!(!this.outputEmpty && this.first)) {
if (this.first) {

@@ -247,4 +249,4 @@ this.queue(this.op);

this.queue(this.cl);
this.resume();
}
this.resume();
}

@@ -251,0 +253,0 @@ this.stopped = true;

{
"name": "stream-stringify",
"version": "2.1.0",
"version": "2.2.0",
"description": "Stringify nested JSON through streams.",

@@ -5,0 +5,0 @@ "main": "lib/stream-stringify.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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