This commit is contained in:
Minho
2017-04-19 18:19:27 +08:00
parent fedf66bc0e
commit 4ebc28a431
308 changed files with 168450 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
"use strict";
exports.__esModule = true;
exports.hasOwn = hasOwn;
exports.toObject = toObject;
var hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(obj, key) {
return hasOwnProperty.call(obj, key);
};
function extend(to, _from) {
for (var key in _from) {
to[key] = _from[key];
}
return to;
};
function toObject(arr) {
var res = {};
for (var i = 0; i < arr.length; i++) {
if (arr[i]) {
extend(res, arr[i]);
}
}
return res;
};