Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/austingebauer/devise.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/json-stringify-safe/stringify.js')
-rw-r--r--node_modules/json-stringify-safe/stringify.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/node_modules/json-stringify-safe/stringify.js b/node_modules/json-stringify-safe/stringify.js
deleted file mode 100644
index 124a452..0000000
--- a/node_modules/json-stringify-safe/stringify.js
+++ /dev/null
@@ -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)
- }
-}