• File: assign.js
  • Full Path: /home6/laduliya/test.mydthpay.com/node_modules/npm/node_modules/es-abstract/helpers/assign.js
  • Date Modified: 10/26/1985 11:45 AM
  • File size: 351 bytes
  • MIME-type: text/plain
  • Charset: utf-8
var bind = require('function-bind');
var has = bind.call(Function.call, Object.prototype.hasOwnProperty);

var $assign = Object.assign;

module.exports = function assign(target, source) {
	if ($assign) {
		return $assign(target, source);
	}

	for (var key in source) {
		if (has(source, key)) {
			target[key] = source[key];
		}
	}
	return target;
};