mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-05 03:41:12 +00:00
.
This commit is contained in:
parent
a004f0ae58
commit
fc725ba36b
7280 changed files with 19 additions and 1796407 deletions
27
node_modules/json-stringify-safe/stringify.js
generated
vendored
27
node_modules/json-stringify-safe/stringify.js
generated
vendored
|
@ -1,27 +0,0 @@
|
|||
exports = module.exports = stringify
|
||||
exports.getSerialize = serializer
|
||||
|
||||
function stringify(obj, replacer, spaces, cycleReplacer) {
|
||||
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
|
||||
}
|
||||
|
||||
function serializer(replacer, cycleReplacer) {
|
||||
var stack = [], keys = []
|
||||
|
||||
if (cycleReplacer == null) cycleReplacer = function(key, value) {
|
||||
if (stack[0] === value) return "[Circular ~]"
|
||||
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
|
||||
}
|
||||
|
||||
return function(key, value) {
|
||||
if (stack.length > 0) {
|
||||
var thisPos = stack.indexOf(this)
|
||||
~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
|
||||
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
|
||||
if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
|
||||
}
|
||||
else stack.push(value)
|
||||
|
||||
return replacer == null ? value : replacer.call(this, key, value)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue