PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/tcomb/lib
Просмотр файла: mixin.js
var isNil = require('./isNil');
var assert = require('./assert');
// safe mixin, cannot override props unless specified
module.exports = function mixin(target, source, overwrite) {
if (isNil(source)) { return target; }
for (var k in source) {
if (source.hasOwnProperty(k)) {
if (overwrite !== true) {
if (process.env.NODE_ENV !== 'production') {
assert(!target.hasOwnProperty(k) || target[k] === source[k], function () { return 'Invalid call to mixin(target, source, [overwrite]): cannot overwrite property "' + k + '" of target object'; });
}
}
target[k] = source[k];
}
}
return target;
};Выполнить команду
Для локальной разработки. Не используйте в интернете!