summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/extend
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/extend')
-rw-r--r--tools/node_modules/eslint/node_modules/extend/LICENSE23
-rw-r--r--tools/node_modules/eslint/node_modules/extend/README.md81
-rw-r--r--tools/node_modules/eslint/node_modules/extend/index.js86
-rw-r--r--tools/node_modules/eslint/node_modules/extend/package.json75
4 files changed, 265 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/extend/LICENSE b/tools/node_modules/eslint/node_modules/extend/LICENSE
new file mode 100644
index 0000000000..e16d6a56ca
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Stefan Thomas
+
+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.
+
diff --git a/tools/node_modules/eslint/node_modules/extend/README.md b/tools/node_modules/eslint/node_modules/extend/README.md
new file mode 100644
index 0000000000..5b8249aa95
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/README.md
@@ -0,0 +1,81 @@
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+
+# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
+
+`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
+
+Notes:
+
+* Since Node.js >= 4,
+ [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ now offers the same functionality natively (but without the "deep copy" option).
+ See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
+* Some native implementations of `Object.assign` in both Node.js and many
+ browsers (since NPM modules are for the browser too) may not be fully
+ spec-compliant.
+ Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
+ a compliant candidate.
+
+## Installation
+
+This package is available on [npm][npm-url] as: `extend`
+
+``` sh
+npm install extend
+```
+
+## Usage
+
+**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
+
+*Extend one object with one or more others, returning the modified object.*
+
+**Example:**
+
+``` js
+var extend = require('extend');
+extend(targetObject, object1, object2);
+```
+
+Keep in mind that the target object will be modified, and will be returned from extend().
+
+If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
+Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
+Warning: passing `false` as the first argument is not supported.
+
+### Arguments
+
+* `deep` *Boolean* (optional)
+If set, the merge becomes recursive (i.e. deep copy).
+* `target` *Object*
+The object to extend.
+* `object1` *Object*
+The object that will be merged into the first.
+* `objectN` *Object* (Optional)
+More objects to merge into the first.
+
+## License
+
+`node-extend` is licensed under the [MIT License][mit-license-url].
+
+## Acknowledgements
+
+All credit to the jQuery authors for perfecting this amazing utility.
+
+Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
+
+[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
+[travis-url]: https://travis-ci.org/justmoon/node-extend
+[npm-url]: https://npmjs.org/package/extend
+[mit-license-url]: http://opensource.org/licenses/MIT
+[github-justmoon]: https://github.com/justmoon
+[github-insin]: https://github.com/insin
+[github-ljharb]: https://github.com/ljharb
+[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
+[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
+[deps-url]: https://david-dm.org/justmoon/node-extend
+[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
+[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
+
diff --git a/tools/node_modules/eslint/node_modules/extend/index.js b/tools/node_modules/eslint/node_modules/extend/index.js
new file mode 100644
index 0000000000..bbe53f6608
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/index.js
@@ -0,0 +1,86 @@
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isArray = function isArray(arr) {
+ if (typeof Array.isArray === 'function') {
+ return Array.isArray(arr);
+ }
+
+ return toStr.call(arr) === '[object Array]';
+};
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) { /**/ }
+
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+module.exports = function extend() {
+ var options, name, src, copy, copyIsArray, clone;
+ var target = arguments[0];
+ var i = 1;
+ var length = arguments.length;
+ var deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean') {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+ if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
+ target = {};
+ }
+
+ for (; i < length; ++i) {
+ options = arguments[i];
+ // Only deal with non-null/undefined values
+ if (options != null) {
+ // Extend the base object
+ for (name in options) {
+ src = target[name];
+ copy = options[name];
+
+ // Prevent never-ending loop
+ if (target !== copy) {
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
+ if (copyIsArray) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+ } else {
+ clone = src && isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[name] = extend(deep, clone, copy);
+
+ // Don't bring in undefined values
+ } else if (typeof copy !== 'undefined') {
+ target[name] = copy;
+ }
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
diff --git a/tools/node_modules/eslint/node_modules/extend/package.json b/tools/node_modules/eslint/node_modules/extend/package.json
new file mode 100644
index 0000000000..935c911c2d
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/extend/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "extend@^3.0.0",
+ "_id": "extend@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
+ "_location": "/extend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "extend@^3.0.0",
+ "name": "extend",
+ "escapedName": "extend",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/unified"
+ ],
+ "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
+ "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444",
+ "_spec": "extend@^3.0.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/unified",
+ "author": {
+ "name": "Stefan Thomas",
+ "email": "justmoon@members.fsf.org",
+ "url": "http://www.justmoon.net"
+ },
+ "bugs": {
+ "url": "https://github.com/justmoon/node-extend/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Port of jQuery.extend for node.js and the browser",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^11.0.0",
+ "covert": "^1.1.0",
+ "eslint": "^3.19.0",
+ "jscs": "^3.0.7",
+ "tape": "^4.6.3"
+ },
+ "homepage": "https://github.com/justmoon/node-extend#readme",
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "name": "extend",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/justmoon/node-extend.git"
+ },
+ "scripts": {
+ "coverage": "covert test/index.js",
+ "coverage-quiet": "covert test/index.js --quiet",
+ "eslint": "eslint *.js */*.js",
+ "jscs": "jscs *.js */*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "posttest": "npm run coverage-quiet",
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "tests-only": "node test"
+ },
+ "version": "3.0.1"
+}