UNPKG

@mdui/jq

Version:

拥有和 jQuery 相似 API 的轻量级 JavaScript 工具库

12 lines (11 loc) 334 B
import { isUndefined, eachObject, eachArray } from '../shared/helper.js'; export function extend(target, ...objectN) { eachArray(objectN, (object) => { eachObject(object, (prop, value) => { if (!isUndefined(value)) { target[prop] = value; } }); }); return target; }