immutable.js 384 B

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