Template Upload
This commit is contained in:
21
node_modules/is-equal-shallow/LICENSE
generated
vendored
Normal file
21
node_modules/is-equal-shallow/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 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.
|
90
node_modules/is-equal-shallow/README.md
generated
vendored
Normal file
90
node_modules/is-equal-shallow/README.md
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
# is-equal-shallow [](http://badge.fury.io/js/is-equal-shallow) [](https://travis-ci.org/jonschlinkert/is-equal-shallow)
|
||||
|
||||
> Does a shallow comparison of two objects, returning false if the keys or values differ.
|
||||
|
||||
The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives.
|
||||
|
||||
* only compares objects.
|
||||
* only compares the first level of each object
|
||||
* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned.
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i is-equal-shallow --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var equals = require('is-equal-shallow');
|
||||
equals(object_a, object_b);
|
||||
```
|
||||
|
||||
**Examples**
|
||||
|
||||
```js
|
||||
equals({a: true, b: true}, {a: true, b: true});
|
||||
//=> 'true'
|
||||
|
||||
equals({a: true, b: false}, {c: false, b: false});
|
||||
//=> 'false'
|
||||
|
||||
equals({a: true, b: false}, {a: false, b: false});
|
||||
//=> 'false'
|
||||
```
|
||||
|
||||
Strict comparison for equality:
|
||||
|
||||
```js
|
||||
equals({a: true, b: true}, {a: true, b: 'true'});
|
||||
//=> 'false'
|
||||
```
|
||||
|
||||
When values are not primitives, `false` is always returned:
|
||||
|
||||
```js
|
||||
equals({ b: {}}, { b: {}});
|
||||
//=> 'false'
|
||||
|
||||
equals({ b: []}, { b: []});
|
||||
//=> 'false'
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
Other object utils:
|
||||
|
||||
* [clone-deep](https://github.com/jonschlinkert/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.
|
||||
* [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)
|
||||
* [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)
|
||||
* [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.
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-equal-shallow/issues/new)
|
||||
|
||||
## 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 22, 2015._
|
27
node_modules/is-equal-shallow/index.js
generated
vendored
Normal file
27
node_modules/is-equal-shallow/index.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* is-equal-shallow <https://github.com/jonschlinkert/is-equal-shallow>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isPrimitive = require('is-primitive');
|
||||
|
||||
module.exports = function isEqual(a, b) {
|
||||
if (!a && !b) { return true; }
|
||||
if (!a && b || a && !b) { return false; }
|
||||
|
||||
var numKeysA = 0, numKeysB = 0, key;
|
||||
for (key in b) {
|
||||
numKeysB++;
|
||||
if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (key in a) {
|
||||
numKeysA++;
|
||||
}
|
||||
return numKeysA === numKeysB;
|
||||
};
|
111
node_modules/is-equal-shallow/package.json
generated
vendored
Normal file
111
node_modules/is-equal-shallow/package.json
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"is-equal-shallow@^0.1.3",
|
||||
"C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\regex-cache"
|
||||
]
|
||||
],
|
||||
"_from": "is-equal-shallow@>=0.1.3-0 <0.2.0-0",
|
||||
"_id": "is-equal-shallow@0.1.3",
|
||||
"_inCache": true,
|
||||
"_location": "/is-equal-shallow",
|
||||
"_nodeVersion": "0.12.4",
|
||||
"_npmUser": {
|
||||
"email": "github@sellside.com",
|
||||
"name": "jonschlinkert"
|
||||
},
|
||||
"_npmVersion": "2.10.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "is-equal-shallow",
|
||||
"raw": "is-equal-shallow@^0.1.3",
|
||||
"rawSpec": "^0.1.3",
|
||||
"scope": null,
|
||||
"spec": ">=0.1.3-0 <0.2.0-0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/regex-cache"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
|
||||
"_shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "is-equal-shallow@^0.1.3",
|
||||
"_where": "C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\regex-cache",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-equal-shallow/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-primitive": "^2.0.0"
|
||||
},
|
||||
"description": "Does a shallow comparison of two objects, returning false if the keys or values differ.",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534",
|
||||
"tarball": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "dceb47dd9c9c21066958116e3b54b3c8c251ee4a",
|
||||
"homepage": "https://github.com/jonschlinkert/is-equal-shallow",
|
||||
"installable": true,
|
||||
"keywords": [
|
||||
"compare",
|
||||
"comparison",
|
||||
"equal",
|
||||
"equals",
|
||||
"is",
|
||||
"is-equal",
|
||||
"key",
|
||||
"object",
|
||||
"same",
|
||||
"shallow",
|
||||
"value"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
},
|
||||
{
|
||||
"name": "doowb",
|
||||
"email": "brian.woodward@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "is-equal-shallow",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jonschlinkert/is-equal-shallow.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verbiage": {
|
||||
"related": {
|
||||
"description": "Other object utils:",
|
||||
"list": [
|
||||
"clone-deep",
|
||||
"for-in",
|
||||
"for-own",
|
||||
"is-plain-object",
|
||||
"isobject"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "0.1.3"
|
||||
}
|
Reference in New Issue
Block a user