UNPKG

date-fns

Version:

Modern JavaScript date utility library

14 lines (12 loc) 347 B
export default function assign(target, object) { if (target == null) { throw new TypeError('assign requires that input parameter not be null or undefined'); } for (var property in object) { if (Object.prototype.hasOwnProperty.call(object, property)) { ; target[property] = object[property]; } } return target; }