mutable.js 369 B

1234567891011121314151617
  1. module.exports = extend
  2. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3. function extend(target) {
  4. for (var i = 1; i < arguments.length; i++) {
  5. var source = arguments[i]
  6. for (var key in source) {
  7. if (hasOwnProperty.call(source, key)) {
  8. target[key] = source[key]
  9. }
  10. }
  11. }
  12. return target
  13. }