08-27-周三_17-09-29
This commit is contained in:
30
node_modules/xtend/.jshintrc
generated
vendored
Normal file
30
node_modules/xtend/.jshintrc
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"maxdepth": 4,
|
||||
"maxstatements": 200,
|
||||
"maxcomplexity": 12,
|
||||
"maxlen": 80,
|
||||
"maxparams": 5,
|
||||
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"latedef": false,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"undef": true,
|
||||
"unused": "vars",
|
||||
"trailing": true,
|
||||
|
||||
"quotmark": true,
|
||||
"expr": true,
|
||||
"asi": true,
|
||||
|
||||
"browser": false,
|
||||
"esnext": true,
|
||||
"devel": false,
|
||||
"node": false,
|
||||
"nonstandard": false,
|
||||
|
||||
"predef": ["require", "module", "__dirname", "__filename"]
|
||||
}
|
20
node_modules/xtend/LICENSE
generated
vendored
Normal file
20
node_modules/xtend/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2012-2014 Raynos.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
32
node_modules/xtend/README.md
generated
vendored
Normal file
32
node_modules/xtend/README.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# xtend
|
||||
|
||||
[![browser support][3]][4]
|
||||
|
||||
[](http://github.com/badges/stability-badges)
|
||||
|
||||
Extend like a boss
|
||||
|
||||
xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
|
||||
|
||||
## Examples
|
||||
|
||||
```js
|
||||
var extend = require("xtend")
|
||||
|
||||
// extend returns a new object. Does not mutate arguments
|
||||
var combination = extend({
|
||||
a: "a",
|
||||
b: "c"
|
||||
}, {
|
||||
b: "b"
|
||||
})
|
||||
// { a: "a", b: "b" }
|
||||
```
|
||||
|
||||
## Stability status: Locked
|
||||
|
||||
## MIT Licensed
|
||||
|
||||
|
||||
[3]: http://ci.testling.com/Raynos/xtend.png
|
||||
[4]: http://ci.testling.com/Raynos/xtend
|
19
node_modules/xtend/immutable.js
generated
vendored
Normal file
19
node_modules/xtend/immutable.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = extend
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
function extend() {
|
||||
var target = {}
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var source = arguments[i]
|
||||
|
||||
for (var key in source) {
|
||||
if (hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target
|
||||
}
|
17
node_modules/xtend/mutable.js
generated
vendored
Normal file
17
node_modules/xtend/mutable.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = extend
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
function extend(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i]
|
||||
|
||||
for (var key in source) {
|
||||
if (hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target
|
||||
}
|
131
node_modules/xtend/package.json
generated
vendored
Normal file
131
node_modules/xtend/package.json
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"name": "xtend",
|
||||
"raw": "xtend@^4.0.0",
|
||||
"rawSpec": "^4.0.0",
|
||||
"scope": null,
|
||||
"spec": ">=4.0.0 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/root/gitbook/node_modules/is-my-json-valid"
|
||||
]
|
||||
],
|
||||
"_from": "xtend@>=4.0.0 <5.0.0",
|
||||
"_hasShrinkwrap": false,
|
||||
"_id": "xtend@4.0.2",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/xtend",
|
||||
"_nodeVersion": "10.15.3",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/xtend_4.0.2_1562592945262_0.1667332210531911"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "raynos2@gmail.com",
|
||||
"name": "raynos"
|
||||
},
|
||||
"_npmVersion": "6.9.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "xtend",
|
||||
"raw": "xtend@^4.0.0",
|
||||
"rawSpec": "^4.0.0",
|
||||
"scope": null,
|
||||
"spec": ">=4.0.0 <5.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/is-my-json-valid"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"_shasum": "bb72779f5fa465186b1f438f674fa347fdb5db54",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "xtend@^4.0.0",
|
||||
"_where": "/root/gitbook/node_modules/is-my-json-valid",
|
||||
"author": {
|
||||
"email": "raynos2@gmail.com",
|
||||
"name": "Raynos"
|
||||
},
|
||||
"bugs": {
|
||||
"email": "raynos2@gmail.com",
|
||||
"url": "https://github.com/Raynos/xtend/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jake Verbaten"
|
||||
},
|
||||
{
|
||||
"name": "Matt Esch"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "extend like a boss",
|
||||
"devDependencies": {
|
||||
"tape": "~1.1.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"fileCount": 7,
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
||||
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI0ayCRA9TVsSAnZWagAAx5sP/0GFGMoeIKaOsNkW4VqT\npbchFQOM3JuA3y4h1pL0kHhRETKAN9aTU1eBv9VleXcCI5kbhtCQONZWCBGH\n4SV9SUFTE+Com3Yo1X1F00Fc8UEx1JtbSf82DLvjUy3dW4I7nGN6o001/lO1\nMjBB5fi4xrP/YPMuVbXhcB2WrgZ6X2VeSSAHnhkfxwfOAVq+shXzYvmRvFnN\nacFhuKRbQx24fQQPZrRY0FyCc797AJZhNJmrq3CRNbpkJ32TrKIjYibB6xm5\nE7HGTPKxF4j0WRlcRLOrhAIUXLV/kg7l5/YGCGjgzjhqGyoIId1Tn4tNinYb\naUcYalwfE8a4w6WdJp+rtNjftK2sjju5cqKbyg2UkelihMUlEhbeO+MfHgVa\nuXrrMnD55o/zMLnNfh31N2zEWAFbo5O7bdgD066zERKxMcvzOU6e/NgEYN3I\n0IJHNmYTb6sjFSC3+dsoLdyoHyda8wtnmuD2jiRLALMb22SdJG7n2DOJV6jc\n2nqTOn31vz9uB3WT5eLadpmNzYx7x/0cs5So2JGuBVMYYc+jmeqLo/6ZdG7w\nNi/hw8ZXh2RTsWPlXDcO99jQqzHg62J09h+Mci0GSVkl/fnHbx3Ho/jG7E5z\nwxbryfQHlY5haAOEATFROEQlXvAs3NIXCp1EG1fyqjyQU2MU1rZsPwycGF5Q\nff8r\r\n=1Too\r\n-----END PGP SIGNATURE-----\r\n",
|
||||
"shasum": "bb72779f5fa465186b1f438f674fa347fdb5db54",
|
||||
"signatures": [
|
||||
{
|
||||
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
|
||||
"sig": "MEUCIGdmf+bgu61rfNBRKVi09KsA3j9/m/tlbW6KO5q0bEtfAiEAy6Bf/a+tJn0ZAsmOMDSx9osBllFMaoYgFkKl9Uy37P8="
|
||||
}
|
||||
],
|
||||
"tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"unpackedSize": 6465
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4"
|
||||
},
|
||||
"gitHead": "37816c0e2e25da2901d584442235946d5cd8c80d",
|
||||
"homepage": "https://github.com/Raynos/xtend",
|
||||
"keywords": [
|
||||
"extend",
|
||||
"merge",
|
||||
"options",
|
||||
"opts",
|
||||
"object",
|
||||
"array"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "immutable",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "raynos2@gmail.com",
|
||||
"name": "raynos"
|
||||
}
|
||||
],
|
||||
"name": "xtend",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Raynos/xtend.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"testling": {
|
||||
"browsers": [
|
||||
"ie/7..latest",
|
||||
"firefox/16..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/22..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest"
|
||||
],
|
||||
"files": "test.js"
|
||||
},
|
||||
"version": "4.0.2"
|
||||
}
|
103
node_modules/xtend/test.js
generated
vendored
Normal file
103
node_modules/xtend/test.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
var test = require("tape")
|
||||
var extend = require("./")
|
||||
var mutableExtend = require("./mutable")
|
||||
|
||||
test("merge", function(assert) {
|
||||
var a = { a: "foo" }
|
||||
var b = { b: "bar" }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("replace", function(assert) {
|
||||
var a = { a: "foo" }
|
||||
var b = { a: "bar" }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("undefined", function(assert) {
|
||||
var a = { a: undefined }
|
||||
var b = { b: "foo" }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
|
||||
assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("handle 0", function(assert) {
|
||||
var a = { a: "default" }
|
||||
var b = { a: 0 }
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: 0 })
|
||||
assert.deepEqual(extend(b, a), { a: "default" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("is immutable", function (assert) {
|
||||
var record = {}
|
||||
|
||||
extend(record, { foo: "bar" })
|
||||
assert.equal(record.foo, undefined)
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("null as argument", function (assert) {
|
||||
var a = { foo: "bar" }
|
||||
var b = null
|
||||
var c = void 0
|
||||
|
||||
assert.deepEqual(extend(b, a, c), { foo: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("mutable", function (assert) {
|
||||
var a = { foo: "bar" }
|
||||
|
||||
mutableExtend(a, { bar: "baz" })
|
||||
|
||||
assert.equal(a.bar, "baz")
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("null prototype", function(assert) {
|
||||
var a = { a: "foo" }
|
||||
var b = Object.create(null)
|
||||
b.b = "bar";
|
||||
|
||||
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("null prototype mutable", function (assert) {
|
||||
var a = { foo: "bar" }
|
||||
var b = Object.create(null)
|
||||
b.bar = "baz";
|
||||
|
||||
mutableExtend(a, b)
|
||||
|
||||
assert.equal(a.bar, "baz")
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("prototype pollution", function (assert) {
|
||||
var a = {}
|
||||
var maliciousPayload = '{"__proto__":{"oops":"It works!"}}'
|
||||
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
extend({}, maliciousPayload)
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("prototype pollution mutable", function (assert) {
|
||||
var a = {}
|
||||
var maliciousPayload = '{"__proto__":{"oops":"It works!"}}'
|
||||
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
mutableExtend({}, maliciousPayload)
|
||||
assert.strictEqual(a.oops, undefined)
|
||||
assert.end()
|
||||
})
|
Reference in New Issue
Block a user