Sha256: c50fc6547a47313246ff4ca7348b5bbe6370ff7f94be38f8301ce1d2f0bbc263

Contents?: true

Size: 345 Bytes

Versions: 85

Compression:

Stored size: 345 Bytes

Contents

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;
}

Version data entries

85 entries across 84 versions & 14 rubygems

Version Path
card-mod-date-0.15.6 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.15.0 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.14.2 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.14.1 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.14.0 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.13.4 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.13.3 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.13.2 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.13.1 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.13.0 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.7 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.12.0 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.6 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.5 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.4 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.3 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.2 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.1 vendor/moment/src/lib/utils/extend.js
card-mod-date-0.11.0 vendor/moment/src/lib/utils/extend.js
card-1.100.0 mod/date/vendor/moment/src/lib/utils/extend.js