11 lines
347 B
JavaScript
11 lines
347 B
JavaScript
var $ = require('./$')
|
|
, ownKeys = require('./$.own-keys')
|
|
, toIObject = require('./$.to-iobject');
|
|
|
|
module.exports = function define(target, mixin){
|
|
var keys = ownKeys(toIObject(mixin))
|
|
, length = keys.length
|
|
, i = 0, key;
|
|
while(length > i)$.setDesc(target, key = keys[i++], $.getDesc(mixin, key));
|
|
return target;
|
|
}; |