immutable.js 384 B

12345678910111213141516171819
  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. }