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

js-yaml

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-yaml - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

test/functional/loader/dump-empty-collection.js

6

HISTORY.md

@@ -0,1 +1,7 @@

2.0.3 / 2013-02-26
------------------
* Fixed dumping of empty arrays ans objects. ([] and {} instead of null)
2.0.2 / 2013-02-15

@@ -2,0 +8,0 @@ ------------------

6

lib/js-yaml/dumper.js

@@ -123,3 +123,3 @@ 'use strict';

}
return '\\' + handle + common.repeat('0', length - string.length) + string;

@@ -403,3 +403,3 @@ }

if ('object' === kind) {
if (block) {
if (block && (0 !== Object.keys(result).length)) {
writeBlockMapping(level, result, compact);

@@ -410,3 +410,3 @@ } else {

} else if ('array' === kind) {
if (block) {
if (block && (0 !== result.length)) {
writeBlockSequence(level, result, compact);

@@ -413,0 +413,0 @@ } else {

@@ -14,3 +14,3 @@ 'use strict';

var result;
result = 'JS-YAML: ' + (this.reason || '(unknown reason)');

@@ -17,0 +17,0 @@

@@ -130,3 +130,3 @@ 'use strict';

typeMap = schema.compiledTypeMap,
length = input.length,

@@ -138,3 +138,3 @@ position = 0,

character = input.charCodeAt(position),
version,

@@ -256,3 +256,3 @@ checkLineBreaks,

sourceKeys = Object.keys(source);
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {

@@ -287,3 +287,3 @@ key = sourceKeys[index];

}
return _result;

@@ -348,3 +348,3 @@ }

var _position, _character;
if (position === lineStart &&

@@ -439,3 +439,3 @@ (CHAR_MINUS === character || CHAR_DOT === character) &&

following = input.charCodeAt(position + 1);
if (CHAR_SPACE === following ||

@@ -463,3 +463,3 @@ CHAR_TAB === following ||

}
} else if ((position === lineStart && testDocumentSeparator()) ||

@@ -561,3 +561,3 @@ withinFlowCollection &&

}
function readDoubleQuotedScalar(nodeIndent) {

@@ -626,3 +626,3 @@ var captureStart,

}
captureStart = captureEnd = position;

@@ -810,3 +810,3 @@

}
while (position < length) {

@@ -1075,3 +1075,3 @@ readLineBreak();

tagName;
if (CHAR_EXCLAMATION !== character) {

@@ -1159,3 +1159,3 @@ return false;

tag = 'tag:yaml.org,2002:' + tagName;
} else {

@@ -1274,3 +1274,3 @@ throwError('undeclared tag handle "' + tagHandle + '"');

isIndented = true;
} else {

@@ -1335,6 +1335,6 @@ return false;

}
} else if (readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
hasContent = true;
if (null === tag) {

@@ -1341,0 +1341,0 @@ tag = '?';

@@ -22,3 +22,3 @@ 'use strict';

});
result.push(currentType);

@@ -25,0 +25,0 @@ });

@@ -11,3 +11,3 @@ 'use strict';

var func;
try {

@@ -14,0 +14,0 @@ func = new Function('return ' + object);

{
"name" : "js-yaml",
"version" : "2.0.2",
"version" : "2.0.3",
"description" : "YAML 1.2 parser and serializer",

@@ -5,0 +5,0 @@ "keywords" : ["yaml", "parser", "serializer", "pyyaml"],

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

ownUtils.isObject(expected)) {
ensureEqualValues(

@@ -26,3 +26,3 @@ context,

'prototypes');
if (ownUtils.isInstanceOf(Date, actual, expected)) {

@@ -29,0 +29,0 @@ ensureEqualDates(context, actual, expected);

@@ -35,3 +35,3 @@ 'use strict';

assert(typeof snippet, 'string');
temp = snippet.split('\n');

@@ -38,0 +38,0 @@ assert.strictEqual(temp.length, 2);

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