We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
从 yygmind/blog#26 学习的,感谢大佬分享
// 模拟Object.assign方法 if (typeof Object.assign2 !== 'function') { Object.defineProperties(Object, 'assign2', { value: function(target) { if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); } let obj = Object(target); for (let i = 1, len = arguments.length; i < len; i++) { const source = arguments[i]; if (source != null) { for (let key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { obj[key] = source[key]; } } } } return obj; }, configurable: true, writable: true }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
从 yygmind/blog#26 学习的,感谢大佬分享
The text was updated successfully, but these errors were encountered: