@base2/pretty-print-object
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -36,5 +36,5 @@ interface StringifyObjectOptions { | ||
} | ||
export declare function stringifyObject(input: any): string; | ||
export declare function stringifyObject(input: any, options: StringifyObjectOptions): string; | ||
export declare function stringifyObject(input: any, options: StringifyObjectOptions, pad: string): string; | ||
export declare function stringify(input: any): string; | ||
export declare function stringify(input: any, options: StringifyObjectOptions): string; | ||
export declare function stringify(input: any, options: StringifyObjectOptions, pad: string): string; | ||
export {}; |
@@ -56,3 +56,3 @@ "use strict"; | ||
*/ | ||
function stringifyObject(input, options, pad) { | ||
function stringify(input, options, pad) { | ||
if (pad === void 0) { pad = ''; } | ||
@@ -120,3 +120,3 @@ // sensible option defaults | ||
var eol = input.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace; | ||
var value = stringifyObject(el, combinedOptions, pad + combinedOptions.indent); | ||
var value = stringify(el, combinedOptions, pad + combinedOptions.indent); | ||
if (combinedOptions.transform) { | ||
@@ -143,4 +143,4 @@ value = combinedOptions.transform(input, i, value); | ||
var isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el.toString()); | ||
var key = isSymbol || isClassic ? el : stringifyObject(el, combinedOptions); | ||
var value = stringifyObject(input[el], combinedOptions, pad + combinedOptions.indent); | ||
var key = isSymbol || isClassic ? el : stringify(el, combinedOptions); | ||
var value = stringify(input[el], combinedOptions, pad + combinedOptions.indent); | ||
if (combinedOptions.transform) { | ||
@@ -162,3 +162,3 @@ value = combinedOptions.transform(input, el, value); | ||
} | ||
exports.stringifyObject = stringifyObject; | ||
exports.stringify = stringify; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@base2/pretty-print-object", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Convert an object or array into a formatted string", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
17915