3 var value = require('./valid-value')
5 , defineProperty = Object.defineProperty
6 , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
7 , getOwnPropertyNames = Object.getOwnPropertyNames;
9 module.exports = function (target, source) {
11 target = Object(value(target));
12 getOwnPropertyNames(Object(value(source))).forEach(function (name) {
14 defineProperty(target, name, getOwnPropertyDescriptor(source, name));
15 } catch (e) { error = e; }
17 if (error !== undefined) throw error;