worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
21
node_modules/shallowequal/LICENSE
generated
vendored
Normal file
21
node_modules/shallowequal/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 Alberto Leal <mailforalberto@gmail.com> (github.com/dashed)
|
||||
|
||||
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.
|
||||
63
node_modules/shallowequal/README.md
generated
vendored
Normal file
63
node_modules/shallowequal/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# shallowequal [](https://travis-ci.org/dashed/shallowequal) [](https://npmjs.com/shallowequal) [](https://www.npmjs.com/package/shallowequal)
|
||||
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
> `shallowequal` is like lodash's [`isEqualWith`](https://lodash.com/docs/4.17.4#isEqualWith) but for shallow (strict) equal.
|
||||
|
||||
`shallowequal(value, other, [customizer], [thisArg])`
|
||||
|
||||
Performs a ***shallow equality*** comparison between two values (i.e. `value` and `other`) to determine if they are equivalent.
|
||||
|
||||
The equality is performed by iterating through keys on the given `value`, and returning `false` whenever any key has values which are not **strictly equal** between `value` and `other`. Otherwise, return `true` whenever the values of all keys are strictly equal.
|
||||
|
||||
If `customizer` (expected to be a function) is provided it is invoked to compare values. If `customizer` returns `undefined` (i.e. `void 0`), then comparisons are handled by the `shallowequal` function instead.
|
||||
|
||||
The `customizer` is bound to `thisArg` and invoked with three arguments: `(value, other, key)`.
|
||||
|
||||
**NOTE:** Docs are (shamelessly) adapted from [lodash's v3.x docs](https://lodash.com/docs/3.10.1#isEqualWith)
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ yarn add shallowequal
|
||||
# npm v5+
|
||||
$ npm install shallowequal
|
||||
# before npm v5
|
||||
$ npm install --save shallowequal
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const shallowequal = require('shallowequal');
|
||||
|
||||
const object = { 'user': 'fred' };
|
||||
const other = { 'user': 'fred' };
|
||||
|
||||
object == other;
|
||||
// → false
|
||||
|
||||
shallowequal(object, other);
|
||||
// → true
|
||||
```
|
||||
|
||||
## Credit
|
||||
|
||||
Code for `shallowEqual` originated from https://github.com/gaearon/react-pure-render/ and has since been refactored to have the exact same API as `lodash.isEqualWith` (as of `v4.17.4`).
|
||||
|
||||
## Development
|
||||
|
||||
- `node.js` and `npm`. See: https://github.com/creationix/nvm#installation
|
||||
- `yarn`. See: https://yarnpkg.com/en/docs/install
|
||||
- `npm` dependencies. Run: `yarn install`
|
||||
|
||||
### Chores
|
||||
|
||||
- Lint: `yarn lint`
|
||||
- Test: `yarn test`
|
||||
- Pretty: `yarn pretty`
|
||||
- Pre-publish: `yarn prepublish`
|
||||
|
||||
## License
|
||||
|
||||
MIT.
|
||||
46
node_modules/shallowequal/index.js
generated
vendored
Normal file
46
node_modules/shallowequal/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
//
|
||||
|
||||
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
|
||||
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
||||
|
||||
if (ret !== void 0) {
|
||||
return !!ret;
|
||||
}
|
||||
|
||||
if (objA === objB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var keysA = Object.keys(objA);
|
||||
var keysB = Object.keys(objB);
|
||||
|
||||
if (keysA.length !== keysB.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
||||
|
||||
// Test for A's keys different from B.
|
||||
for (var idx = 0; idx < keysA.length; idx++) {
|
||||
var key = keysA[idx];
|
||||
|
||||
if (!bHasOwnProperty(key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var valueA = objA[key];
|
||||
var valueB = objB[key];
|
||||
|
||||
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
||||
|
||||
if (ret === false || (ret === void 0 && valueA !== valueB)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
8
node_modules/shallowequal/index.js.flow
generated
vendored
Normal file
8
node_modules/shallowequal/index.js.flow
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// @flow
|
||||
|
||||
declare module.exports: <T, U>(
|
||||
objA?: ?T,
|
||||
objB?: ?U,
|
||||
compare?: ?(objValue: any, otherValue: any, key?: string) => boolean | void,
|
||||
compareContext?: ?any
|
||||
) => boolean;
|
||||
51
node_modules/shallowequal/index.original.js
generated
vendored
Normal file
51
node_modules/shallowequal/index.original.js
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
// @flow
|
||||
|
||||
module.exports = function shallowEqual<T, U>(
|
||||
objA?: ?T,
|
||||
objB?: ?U,
|
||||
compare?: ?(objValue: any, otherValue: any, key?: string) => boolean | void,
|
||||
compareContext?: ?any
|
||||
): boolean {
|
||||
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
||||
|
||||
if (ret !== void 0) {
|
||||
return !!ret;
|
||||
}
|
||||
|
||||
if (objA === objB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var keysA = Object.keys(objA);
|
||||
var keysB = Object.keys(objB);
|
||||
|
||||
if (keysA.length !== keysB.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
||||
|
||||
// Test for A's keys different from B.
|
||||
for (var idx = 0; idx < keysA.length; idx++) {
|
||||
var key = keysA[idx];
|
||||
|
||||
if (!bHasOwnProperty(key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var valueA = objA[key];
|
||||
var valueB = objB[key];
|
||||
|
||||
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
||||
|
||||
if (ret === false || (ret === void 0 && valueA !== valueB)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
60
node_modules/shallowequal/package.json
generated
vendored
Normal file
60
node_modules/shallowequal/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"name": "shallowequal",
|
||||
"version": "1.1.0",
|
||||
"description": "Like lodash isEqualWith but for shallow equal.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"lint": "eslint index.js test",
|
||||
"test": "mocha --require babel-register",
|
||||
"build:strip-flow":
|
||||
"flow-remove-types --pretty index.original.js > index.js",
|
||||
"build:gen-flow": "flow gen-flow-files index.original.js > index.js.flow",
|
||||
"build": "npm run build:strip-flow && npm run build:gen-flow",
|
||||
"prepublish":
|
||||
"npm run build && npm run pretty && npm run lint && npm run test",
|
||||
"travis": "npm run lint && npm run test",
|
||||
"pretty": "prettier --write --tab-width 2 'test/**/*.js' '*.{js,js.flow}'",
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,json,css,js.flow}": ["prettier --write", "git add"]
|
||||
},
|
||||
"author": {
|
||||
"name": "Alberto Leal",
|
||||
"email": "mailforalberto@gmail.com",
|
||||
"url": "github.com/dashed"
|
||||
},
|
||||
"repository": "dashed/shallowequal",
|
||||
"license": "MIT",
|
||||
"files": ["index.js", "index.js.flow", "index.original.js"],
|
||||
"keywords": [
|
||||
"shallowequal",
|
||||
"shallow",
|
||||
"equal",
|
||||
"isequal",
|
||||
"compare",
|
||||
"isequalwith"
|
||||
],
|
||||
"eslintConfig": {
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"mocha": true
|
||||
},
|
||||
"extends": ["eslint:recommended"]
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^8.0.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-register": "^6.24.1",
|
||||
"chai": "^4.0.0",
|
||||
"eslint": "^4.7.1",
|
||||
"flow-bin": "^0.75.0",
|
||||
"flow-remove-types": "^1.2.3",
|
||||
"husky": "^0.14.3",
|
||||
"lint-staged": "^6.0.0",
|
||||
"mocha": "^5.0.0",
|
||||
"prettier": "^1.9.2"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue