You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
235 B

7 years ago
  1. module.exports = function (dest, src) {
  2. Object.getOwnPropertyNames(src).forEach(function (name) {
  3. var descriptor = Object.getOwnPropertyDescriptor(src, name)
  4. Object.defineProperty(dest, name, descriptor)
  5. })
  6. return dest
  7. }