| 'use strict'; | ||
| module.exports = { | ||
| emptyArray: [], | ||
| emptyObject: {} | ||
| }; |
Sorry, the diff of this file is not supported yet
+6
-0
@@ -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 @@ ------------------ |
@@ -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 @@ |
+15
-15
@@ -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); |
+1
-1
| { | ||
| "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); |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
175031
0.09%349
0.58%3740
0.13%