mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +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
24
web/node_modules/redux-devtools-extension/utils/assign.js
generated
vendored
Normal file
24
web/node_modules/redux-devtools-extension/utils/assign.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
var objectKeys =
|
||||
Object.keys ||
|
||||
function (obj) {
|
||||
var keys = [];
|
||||
for (var key in obj) {
|
||||
if ({}.hasOwnProperty.call(obj, key)) keys.push(key);
|
||||
}
|
||||
return keys;
|
||||
};
|
||||
|
||||
function assign(obj, newKey, newValue) {
|
||||
var keys = objectKeys(obj);
|
||||
var copy = {};
|
||||
|
||||
for (var i = 0, l = keys.length; i < l; i++) {
|
||||
var key = keys[i];
|
||||
copy[key] = obj[key];
|
||||
}
|
||||
|
||||
copy[newKey] = newValue;
|
||||
return copy;
|
||||
}
|
||||
|
||||
module.exports = assign;
|
Loading…
Add table
Add a link
Reference in a new issue