zk-desktop-ui
Version:
ZKTeco UI Components
22 lines (19 loc) • 396 B
JavaScript
const hasOwnProperty = Object.prototype.hasOwnProperty
export const hasOwn = (obj, key) => {
return hasOwnProperty.call(obj, key)
}
function extend(to, _from) {
for (let key in _from) {
to[key] = _from[key]
}
return to
};
export const toObject = (arr) => {
var res = {}
for (let i = 0; i < arr.length; i++) {
if (arr[i]) {
extend(res, arr[i])
}
}
return res
}