init commit
This commit is contained in:
19
public/assets/libs/moment/src/lib/utils/extend.js
Normal file
19
public/assets/libs/moment/src/lib/utils/extend.js
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user