mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
21
web/node_modules/value-equal/LICENSE
generated
vendored
Normal file
21
web/node_modules/value-equal/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Michael Jackson 2016-2018
|
||||
|
||||
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.
|
54
web/node_modules/value-equal/README.md
generated
vendored
Normal file
54
web/node_modules/value-equal/README.md
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
# value-equal [![Travis][build-badge]][build] [![npm package][npm-badge]][npm]
|
||||
|
||||
[build-badge]: https://img.shields.io/travis/mjackson/value-equal/master.svg?style=flat-square
|
||||
[build]: https://travis-ci.org/mjackson/value-equal
|
||||
[npm-badge]: https://img.shields.io/npm/v/value-equal.svg?style=flat-square
|
||||
[npm]: https://www.npmjs.org/package/value-equal
|
||||
|
||||
[`value-equal`](https://www.npmjs.com/package/value-equal) determines if two JavaScript values are equal using [`Object.prototype.valueOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf).
|
||||
|
||||
In many instances when I'm checking for object equality, what I really want to know is if their **values** are equal. This is good for:
|
||||
|
||||
- Stuff you keep in `localStorage`
|
||||
- `window.history.state` values
|
||||
- Query strings
|
||||
|
||||
## Installation
|
||||
|
||||
Using [npm](https://www.npmjs.com/):
|
||||
|
||||
$ npm install --save value-equal
|
||||
|
||||
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:
|
||||
|
||||
```js
|
||||
// using ES6 modules
|
||||
import valueEqual from 'value-equal';
|
||||
|
||||
// using CommonJS modules
|
||||
var valueEqual = require('value-equal');
|
||||
```
|
||||
|
||||
The UMD build is also available on [unpkg](https://unpkg.com):
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/value-equal"></script>
|
||||
```
|
||||
|
||||
You can find the library on `window.valueEqual`.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
valueEqual(1, 1); // true
|
||||
valueEqual('asdf', 'asdf'); // true
|
||||
valueEqual('asdf', new String('asdf')); // true
|
||||
valueEqual(true, true); // true
|
||||
valueEqual(true, false); // false
|
||||
valueEqual({ a: 'a' }, { a: 'a' }); // true
|
||||
valueEqual({ a: 'a' }, { a: 'b' }); // false
|
||||
valueEqual([1, 2, 3], [1, 2, 3]); // true
|
||||
valueEqual([1, 2, 3], [2, 3, 4]); // false
|
||||
```
|
||||
|
||||
That's it. Enjoy!
|
38
web/node_modules/value-equal/cjs/value-equal.js
generated
vendored
Normal file
38
web/node_modules/value-equal/cjs/value-equal.js
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
'use strict';
|
||||
|
||||
function valueOf(obj) {
|
||||
return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
|
||||
}
|
||||
|
||||
function valueEqual(a, b) {
|
||||
// Test for strict equality first.
|
||||
if (a === b) return true;
|
||||
|
||||
// Otherwise, if either of them == null they are not equal.
|
||||
if (a == null || b == null) return false;
|
||||
|
||||
if (Array.isArray(a)) {
|
||||
return (
|
||||
Array.isArray(b) &&
|
||||
a.length === b.length &&
|
||||
a.every(function(item, index) {
|
||||
return valueEqual(item, b[index]);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof a === 'object' || typeof b === 'object') {
|
||||
var aValue = valueOf(a);
|
||||
var bValue = valueOf(b);
|
||||
|
||||
if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
|
||||
|
||||
return Object.keys(Object.assign({}, a, b)).every(function(key) {
|
||||
return valueEqual(a[key], b[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = valueEqual;
|
1
web/node_modules/value-equal/cjs/value-equal.min.js
generated
vendored
Normal file
1
web/node_modules/value-equal/cjs/value-equal.min.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
"use strict";function valueOf(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function valueEqual(u,r){if(u===r)return!0;if(null==u||null==r)return!1;if(Array.isArray(u))return Array.isArray(r)&&u.length===r.length&&u.every(function(e,u){return valueEqual(e,r[u])});if("object"!=typeof u&&"object"!=typeof r)return!1;var e=valueOf(u),t=valueOf(r);return e!==u||t!==r?valueEqual(e,t):Object.keys(Object.assign({},u,r)).every(function(e){return valueEqual(u[e],r[e])})}module.exports=valueEqual;
|
36
web/node_modules/value-equal/esm/value-equal.js
generated
vendored
Normal file
36
web/node_modules/value-equal/esm/value-equal.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
function valueOf(obj) {
|
||||
return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
|
||||
}
|
||||
|
||||
function valueEqual(a, b) {
|
||||
// Test for strict equality first.
|
||||
if (a === b) return true;
|
||||
|
||||
// Otherwise, if either of them == null they are not equal.
|
||||
if (a == null || b == null) return false;
|
||||
|
||||
if (Array.isArray(a)) {
|
||||
return (
|
||||
Array.isArray(b) &&
|
||||
a.length === b.length &&
|
||||
a.every(function(item, index) {
|
||||
return valueEqual(item, b[index]);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof a === 'object' || typeof b === 'object') {
|
||||
var aValue = valueOf(a);
|
||||
var bValue = valueOf(b);
|
||||
|
||||
if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
|
||||
|
||||
return Object.keys(Object.assign({}, a, b)).every(function(key) {
|
||||
return valueEqual(a[key], b[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export default valueEqual;
|
7
web/node_modules/value-equal/index.js
generated
vendored
Normal file
7
web/node_modules/value-equal/index.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/value-equal.min.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/value-equal.js');
|
||||
}
|
37
web/node_modules/value-equal/package.json
generated
vendored
Normal file
37
web/node_modules/value-equal/package.json
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "value-equal",
|
||||
"version": "1.0.1",
|
||||
"description": "Are these two JavaScript values equal?",
|
||||
"repository": "mjackson/value-equal",
|
||||
"license": "MIT",
|
||||
"author": "Michael Jackson",
|
||||
"files": [
|
||||
"cjs",
|
||||
"esm",
|
||||
"index.js",
|
||||
"umd"
|
||||
],
|
||||
"main": "index.js",
|
||||
"module": "esm/value-equal.js",
|
||||
"unpkg": "umd/value-equal.js",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"clean": "git clean -fdX .",
|
||||
"lint": "eslint modules",
|
||||
"prepublishOnly": "npm run build",
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.6",
|
||||
"@babel/preset-env": "^7.1.6",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^23.6.0",
|
||||
"eslint": "^5.9.0",
|
||||
"jest": "^23.6.0",
|
||||
"rollup": "^0.67.3",
|
||||
"rollup-plugin-replace": "^2.1.0",
|
||||
"rollup-plugin-size-snapshot": "^0.7.0",
|
||||
"rollup-plugin-uglify": "^6.0.0"
|
||||
}
|
||||
}
|
44
web/node_modules/value-equal/umd/value-equal.js
generated
vendored
Normal file
44
web/node_modules/value-equal/umd/value-equal.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global.valueEqual = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
function valueOf(obj) {
|
||||
return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
|
||||
}
|
||||
|
||||
function valueEqual(a, b) {
|
||||
// Test for strict equality first.
|
||||
if (a === b) return true;
|
||||
|
||||
// Otherwise, if either of them == null they are not equal.
|
||||
if (a == null || b == null) return false;
|
||||
|
||||
if (Array.isArray(a)) {
|
||||
return (
|
||||
Array.isArray(b) &&
|
||||
a.length === b.length &&
|
||||
a.every(function(item, index) {
|
||||
return valueEqual(item, b[index]);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof a === 'object' || typeof b === 'object') {
|
||||
var aValue = valueOf(a);
|
||||
var bValue = valueOf(b);
|
||||
|
||||
if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
|
||||
|
||||
return Object.keys(Object.assign({}, a, b)).every(function(key) {
|
||||
return valueEqual(a[key], b[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return valueEqual;
|
||||
|
||||
})));
|
1
web/node_modules/value-equal/umd/value-equal.min.js
generated
vendored
Normal file
1
web/node_modules/value-equal/umd/value-equal.min.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.valueEqual=t()}(this,function(){"use strict";function f(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}return function n(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every(function(e,t){return n(e,r[t])});if("object"!=typeof t&&"object"!=typeof r)return!1;var e=f(t),u=f(r);return e!==t||u!==r?n(e,u):Object.keys(Object.assign({},t,r)).every(function(e){return n(t[e],r[e])})}});
|
Loading…
Add table
Add a link
Reference in a new issue