Comparing version 5.0.0 to 5.0.1
@@ -37,3 +37,3 @@ class Format { | ||
this.path = (this.parent ? this.parent.path : []).concat([obj]) | ||
this.level = this.parent ? this.parent.level + 1 : 1 | ||
this.level = this.parent ? this.parent.level + 1 : 0 | ||
this.indent = this.style === styles.tight ? '' | ||
@@ -111,3 +111,3 @@ : this.parent ? this.parent.indent | ||
const indent = this.isKey ? '' | ||
: new Array(this.level).join(this.indent) | ||
: this.indent.repeat(this.level) | ||
const key = this.isKeyless() ? '' | ||
@@ -485,3 +485,3 @@ : this.printKey(this.key) | ||
indentLevel (n = 0) { | ||
return new Array(this.level + n).join(this.indent) | ||
return this.indent.repeat(this.level + n) | ||
} | ||
@@ -582,3 +582,3 @@ | ||
const l = Math.ceil(chunkSize * 2 * 1.25) | ||
const pad = new Array(l - hex.length).join(' ') + ' ' | ||
const pad = ' '.repeat(l - hex.length + 1) | ||
return hex + pad + bufToAscii(buf) | ||
@@ -635,4 +635,4 @@ }, | ||
bufferLine: (buf, chunkSize) => JSON.stringify(buf.toString('hex')) + | ||
(new Array((chunkSize + 1) * 2 - buf.length * 2).join(' ')) + | ||
' /* ' + bufToAscii(buf) + ' */', | ||
(' '.repeat((chunkSize + 1) * 2 - buf.length * 2)) + | ||
'/* ' + bufToAscii(buf) + ' */', | ||
bufferTail: indent => `\n${indent}, "hex")`, | ||
@@ -639,0 +639,0 @@ bufferLineSep: () => ' +\n', |
{ | ||
"name": "tcompare", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "A comprehensive comparison library, for use in test frameworks", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46416