Initial pass

This commit is contained in:
Danny McCormick
2019-06-26 21:12:00 -04:00
commit 39c08a0eaa
7242 changed files with 1886006 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2017, Jon Schlinkert
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.
+73
View File
File diff suppressed because one or more lines are too long
+30
View File
@@ -0,0 +1,30 @@
'use strict';
var isObject = require('is-extendable');
var union = require('arr-union');
var get = require('get-value');
var set = require('set-value');
module.exports = function unionValue(obj, prop, value) {
if (!isObject(obj)) {
throw new TypeError('union-value expects the first argument to be an object.');
}
if (typeof prop !== 'string') {
throw new TypeError('union-value expects `prop` to be a string.');
}
var arr = arrayify(get(obj, prop));
set(obj, prop, union(arr, arrayify(value)));
return obj;
};
function arrayify(val) {
if (val === null || typeof val === 'undefined') {
return [];
}
if (Array.isArray(val)) {
return val;
}
return [val];
}
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2015, Jon Schlinkert.
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.
+61
View File
@@ -0,0 +1,61 @@
# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow)
> Extend an object with the properties of additional objects. node.js/javascript util.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i extend-shallow --save
```
## Usage
```js
var extend = require('extend-shallow');
extend({a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
Pass an empty object to shallow clone:
```js
var obj = {};
extend(obj, {a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
## Related
* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._
+33
View File
@@ -0,0 +1,33 @@
'use strict';
var isObject = require('is-extendable');
module.exports = function extend(o/*, objects*/) {
if (!isObject(o)) { o = {}; }
var len = arguments.length;
for (var i = 1; i < len; i++) {
var obj = arguments[i];
if (isObject(obj)) {
assign(o, obj);
}
}
return o;
};
function assign(a, b) {
for (var key in b) {
if (hasOwn(b, key)) {
a[key] = b[key];
}
}
}
/**
* Returns true if the given `key` is an own property of `obj`.
*/
function hasOwn(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
+91
View File
@@ -0,0 +1,91 @@
{
"_args": [
[
"[email protected]",
"C:\\Users\\Administrator\\Documents\\setup-python"
]
],
"_development": true,
"_from": "[email protected]",
"_id": "[email protected]",
"_inBundle": false,
"_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"_location": "/union-value/extend-shallow",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "[email protected]",
"name": "extend-shallow",
"escapedName": "extend-shallow",
"rawSpec": "2.0.1",
"saveSpec": null,
"fetchSpec": "2.0.1"
},
"_requiredBy": [
"/union-value/set-value"
],
"_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"_spec": "2.0.1",
"_where": "C:\\Users\\Administrator\\Documents\\setup-python",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
},
"dependencies": {
"is-extendable": "^0.1.0"
},
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
"devDependencies": {
"array-slice": "^0.2.3",
"benchmarked": "^0.1.4",
"chalk": "^1.0.0",
"for-own": "^0.1.3",
"glob": "^5.0.12",
"is-plain-object": "^2.0.1",
"kind-of": "^2.0.0",
"minimist": "^1.1.1",
"mocha": "^2.2.5",
"should": "^7.0.1"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/extend-shallow",
"keywords": [
"assign",
"extend",
"javascript",
"js",
"keys",
"merge",
"obj",
"object",
"prop",
"properties",
"property",
"props",
"shallow",
"util",
"utility",
"utils",
"value"
],
"license": "MIT",
"main": "index.js",
"name": "extend-shallow",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/extend-shallow.git"
},
"scripts": {
"test": "mocha"
},
"version": "2.0.1"
}
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2017, Jon Schlinkert
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.
File diff suppressed because one or more lines are too long
+63
View File
@@ -0,0 +1,63 @@
/*!
* set-value <https://github.com/jonschlinkert/set-value>
*
* Copyright (c) 2014-2015, 2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var toPath = require('to-object-path');
var extend = require('extend-shallow');
var isPlainObject = require('is-plain-object');
var isObject = require('is-extendable');
module.exports = function(obj, path, val) {
if (!isObject(obj)) {
return obj;
}
if (Array.isArray(path)) {
path = toPath(path);
}
if (typeof path !== 'string') {
return obj;
}
var segs = path.split('.');
var len = segs.length, i = -1;
var res = obj;
var last;
while (++i < len) {
var key = segs[i];
while (key[key.length - 1] === '\\') {
key = key.slice(0, -1) + '.' + segs[++i];
}
if (i === len - 1) {
last = key;
break;
}
if (!isObject(obj[key])) {
obj[key] = {};
}
obj = obj[key];
}
if (obj.hasOwnProperty(last) && isObject(obj[last])) {
if (isPlainObject(val)) {
extend(obj[last], val);
} else {
obj[last] = val;
}
} else {
obj[last] = val;
}
return res;
};
+125
View File
@@ -0,0 +1,125 @@
{
"_args": [
[
"[email protected]",
"C:\\Users\\Administrator\\Documents\\setup-python"
]
],
"_development": true,
"_from": "[email protected]",
"_id": "[email protected]",
"_inBundle": false,
"_integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
"_location": "/union-value/set-value",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "[email protected]",
"name": "set-value",
"escapedName": "set-value",
"rawSpec": "0.4.3",
"saveSpec": null,
"fetchSpec": "0.4.3"
},
"_requiredBy": [
"/union-value"
],
"_resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
"_spec": "0.4.3",
"_where": "C:\\Users\\Administrator\\Documents\\setup-python",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/set-value/issues"
},
"contributors": [
{
"email": "[email protected]",
"url": "https://github.com/wtgtybhertgeghgtwtg"
},
{
"name": "Jon Schlinkert",
"email": "[email protected]",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Vadim Demedes",
"email": "[email protected]",
"url": "https://vadimdemedes.com"
}
],
"dependencies": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
"is-plain-object": "^2.0.1",
"to-object-path": "^0.3.0"
},
"description": "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.",
"devDependencies": {
"gulp-format-md": "^0.1.10",
"mocha": "^3.0.2"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/set-value",
"keywords": [
"get",
"has",
"hasown",
"key",
"keys",
"nested",
"notation",
"object",
"prop",
"properties",
"property",
"props",
"set",
"value",
"values"
],
"license": "MIT",
"main": "index.js",
"name": "set-value",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/set-value.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"assign-value",
"get-value",
"has-value",
"merge-value",
"omit-value",
"set-value",
"union-value",
"unset-value"
]
},
"lint": {
"reflinks": true
}
},
"version": "0.4.3"
}
+109
View File
@@ -0,0 +1,109 @@
{
"_args": [
[
"[email protected]",
"C:\\Users\\Administrator\\Documents\\setup-python"
]
],
"_development": true,
"_from": "[email protected]",
"_id": "[email protected]",
"_inBundle": false,
"_integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
"_location": "/union-value",
"_phantomChildren": {
"is-extendable": "0.1.1",
"is-plain-object": "2.0.4",
"to-object-path": "0.3.0"
},
"_requested": {
"type": "version",
"registry": true,
"raw": "[email protected]",
"name": "union-value",
"escapedName": "union-value",
"rawSpec": "1.0.0",
"saveSpec": null,
"fetchSpec": "1.0.0"
},
"_requiredBy": [
"/cache-base"
],
"_resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
"_spec": "1.0.0",
"_where": "C:\\Users\\Administrator\\Documents\\setup-python",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/union-value/issues"
},
"dependencies": {
"arr-union": "^3.1.0",
"get-value": "^2.0.6",
"is-extendable": "^0.1.1",
"set-value": "^0.4.3"
},
"description": "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.",
"devDependencies": {
"gulp-format-md": "^0.1.11",
"mocha": "^3.2.0",
"should": "^11.2.0"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/union-value",
"keywords": [
"array",
"dot",
"get",
"has",
"nested",
"notation",
"object",
"path",
"prop",
"property",
"set",
"union",
"value"
],
"license": "MIT",
"main": "index.js",
"name": "union-value",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/union-value.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"assign-value",
"get-value",
"has-value",
"set-value",
"unset-value"
]
},
"lint": {
"reflinks": true
}
},
"version": "1.0.0"
}