UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

27 lines (23 loc) 656 B
var _has = /*#__PURE__*/require('./_has'); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign function _objectAssign(target) { if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); } var output = Object(target); var idx = 1; var length = arguments.length; while (idx < length) { var source = arguments[idx]; if (source != null) { for (var nextKey in source) { if (_has(nextKey, source)) { output[nextKey] = source[nextKey]; } } } idx += 1; } return output; } module.exports = _objectAssign;