Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let value = stringify(el, options, pad + options.indent);
if (options.transform) {
value = options.transform(input, i, value);
}
return tokens.indent + value + eol;
}).join('') + tokens.pad + ']';
seen.pop();
return expandWhiteSpace(ret);
}
if (isObj(input)) {
let objKeys = Object.keys(input).concat(getOwnEnumPropSymbols(input));
if (options.filter) {
objKeys = objKeys.filter(el => options.filter(input, el));
}
if (objKeys.length === 0) {
return '{}';
}
seen.push(input);
const ret = '{' + tokens.newLine + objKeys.map((el, i) => {
const eol = objKeys.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
const isSymbol = typeof el === 'symbol';
const isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el);
const key = isSymbol || isClassic ? el : stringify(el, options);
value = options.transformValue(input, i, value)
}
return tokens.indent + value + eol
})
.join('') +
tokens.pad +
']'
seen.pop()
return expandWhiteSpace(ret)
}
if (isObj(input)) {
let objKeys = Object.keys(input).concat(getOwnEnumPropSymbols(input))
if (options.filter) {
objKeys = objKeys.filter(el => options.filter(input, el))
}
if (objKeys.length === 0) {
return '{}'
}
seen.push(input)
const ret =
'{' +
tokens.newLine +
objKeys
.map((el, i) => {