corrade-nucleus-nucleons
/pack-rat/003_pack_rat/pack-rat/bower_components/moment/src/lib/utils/extend.js |
---|
@@ -0,0 +1,19 @@ |
import hasOwnProp from './has-own-prop'; |
export default function extend(a, b) { |
for (var i in b) { |
if (hasOwnProp(b, i)) { |
a[i] = b[i]; |
} |
} |
if (hasOwnProp(b, 'toString')) { |
a.toString = b.toString; |
} |
if (hasOwnProp(b, 'valueOf')) { |
a.valueOf = b.valueOf; |
} |
return a; |
} |