Initial
This commit is contained in:
15
resources/app/node_modules/json-stringify-safe/LICENSE
generated
vendored
Normal file
15
resources/app/node_modules/json-stringify-safe/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
35
resources/app/node_modules/json-stringify-safe/Makefile
generated
vendored
Normal file
35
resources/app/node_modules/json-stringify-safe/Makefile
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
NODE_OPTS =
|
||||
TEST_OPTS =
|
||||
|
||||
love:
|
||||
@echo "Feel like makin' love."
|
||||
|
||||
test:
|
||||
@node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS)
|
||||
|
||||
spec:
|
||||
@node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS)
|
||||
|
||||
autotest:
|
||||
@node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS)
|
||||
|
||||
autospec:
|
||||
@node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS)
|
||||
|
||||
pack:
|
||||
@file=$$(npm pack); echo "$$file"; tar tf "$$file"
|
||||
|
||||
publish:
|
||||
npm publish
|
||||
|
||||
tag:
|
||||
git tag "v$$(node -e 'console.log(require("./package").version)')"
|
||||
|
||||
clean:
|
||||
rm -f *.tgz
|
||||
npm prune --production
|
||||
|
||||
.PHONY: love
|
||||
.PHONY: test spec autotest autospec
|
||||
.PHONY: pack publish tag
|
||||
.PHONY: clean
|
||||
18
resources/app/node_modules/json-stringify-safe/package.json
generated
vendored
Normal file
18
resources/app/node_modules/json-stringify-safe/package.json
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "json-stringify-safe",
|
||||
"version": "5.0.1",
|
||||
"description": "Like JSON.stringify, but doesn't blow up on circular refs.",
|
||||
"homepage": "https://github.com/isaacs/json-stringify-safe",
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
|
||||
"license": "ISC",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/json-stringify-safe"
|
||||
},
|
||||
"main": "stringify.js",
|
||||
"devDependencies": {
|
||||
"mocha": ">= 2.1.0 < 3",
|
||||
"must": ">= 0.12 < 0.13",
|
||||
"sinon": ">= 1.12.2 < 2"
|
||||
}
|
||||
}
|
||||
27
resources/app/node_modules/json-stringify-safe/stringify.js
generated
vendored
Normal file
27
resources/app/node_modules/json-stringify-safe/stringify.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user