Browse Source

remove node_modules dir from git, add node_modules to .gitignore

pull/2/merge
Brett Langdon 13 years ago
parent
commit
9f27fb987a
5 changed files with 2 additions and 152 deletions
  1. +2
    -0
      .gitignore
  2. +0
    -1
      node_modules/extend/.npmignore
  3. +0
    -43
      node_modules/extend/README.md
  4. +0
    -77
      node_modules/extend/index.js
  5. +0
    -31
      node_modules/extend/package.json

+ 2
- 0
.gitignore View File

@ -7,6 +7,8 @@ lib-cov
*.pid
*.gz
node_modules
pids
logs
results


+ 0
- 1
node_modules/extend/.npmignore View File

@ -1 +0,0 @@
test

+ 0
- 43
node_modules/extend/README.md View File

@ -1,43 +0,0 @@
# extend() for Node.js
`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
## Installation
This package is available on [NPM](https://npmjs.org/) 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.*
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.
### 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](http://opensource.org/licenses/MIT).
## Acknowledgements
All credit to the jQuery authors for perfecting this amazing utility.
Ported to Node.js by [Stefan Thomas](https://github.com/justmoon) with contributions by [Jonathan Buchanan](https://github.com/insin).

+ 0
- 77
node_modules/extend/index.js View File

@ -1,77 +0,0 @@
var hasOwn = Object.prototype.hasOwnProperty;
function isPlainObject(obj) {
if (!obj || toString.call(obj) !== '[object Object]' || obj.nodeType || obj.setInterval)
return false;
var has_own_constructor = hasOwnProperty.call(obj, 'constructor');
var has_is_property_of_method = hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf');
// Not own constructor property must be Object
if (obj.constructor && !has_own_constructor && !has_is_property_of_method)
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 key === undefined || hasOwn.call( obj, key );
};
module.exports = function extend() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
deep = target;
target = arguments[1] || {};
// skip the boolean and the target
i = 2;
}
// Handle case when target is a string or something (possible in deep copy)
if ( typeof target !== "object" && typeof target !== "function") {
target = {};
}
for ( ; i < length; i++ ) {
// Only deal with non-null/undefined values
if ( (options = arguments[ i ]) != null ) {
// Extend the base object
for ( name in options ) {
src = target[ name ];
copy = options[ name ];
// Prevent never-ending loop
if ( target === copy ) {
continue;
}
// Recurse if we're merging plain objects or arrays
if ( deep && copy && ( isPlainObject(copy) || (copyIsArray = Array.isArray(copy)) ) ) {
if ( copyIsArray ) {
copyIsArray = false;
clone = src && Array.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 ( copy !== undefined ) {
target[ name ] = copy;
}
}
}
}
// Return the modified object
return target;
};

+ 0
- 31
node_modules/extend/package.json View File

@ -1,31 +0,0 @@
{
"name": "extend",
"version": "1.1.3",
"description": "Port of jQuery.extend for Node.js",
"main": "./index",
"keywords": [
"extend",
"clone",
"merge"
],
"author": {
"name": "Stefan Thomas",
"email": "justmoon@members.fsf.org",
"url": "http://www.justmoon.net"
},
"repository": {
"type": "git",
"url": "https://github.com/justmoon/node-extend.git"
},
"devDependencies": {
"buster": "*"
},
"readme": "# extend() for Node.js\n\n`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.\n\n## Installation\n\nThis package is available on [NPM](https://npmjs.org/) as: `extend`\n\n``` sh\nnpm install extend\n```\n\n## Usage\n\n**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** \n\n*Extend one object with one or more others, returning the modified object.*\n\nKeep in mind that the target object will be modified, and will be returned from extend().\n\nIf 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).\nUndefined properties are not copied. However, properties inherited from the object's prototype will be copied over.\n\n### Arguments\n\n* `deep` *Boolean* (optional) \nIf set, the merge becomes recursive (i.e. deep copy).\n* `target`\t*Object* \nThe object to extend.\n* `object1`\t*Object* \nThe object that will be merged into the first.\n* `objectN` *Object* (Optional) \nMore objects to merge into the first.\n\n## License\n\n`node-extend` is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n\n## Acknowledgements\n\nAll credit to the jQuery authors for perfecting this amazing utility.\n\nPorted to Node.js by [Stefan Thomas](https://github.com/justmoon) with contributions by [Jonathan Buchanan](https://github.com/insin).\n",
"readmeFilename": "README.md",
"_id": "extend@1.1.3",
"dist": {
"shasum": "5ab5cabda761d0e40a0ac6e0abae985fbcfd9fcb"
},
"_from": "extend@",
"_resolved": "https://registry.npmjs.org/extend/-/extend-1.1.3.tgz"
}

Loading…
Cancel
Save