mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
*
This commit is contained in:
26
static/element-ui/lib/utils/util.js
Normal file
26
static/element-ui/lib/utils/util.js
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user