src/extras/primitives/primitives.js
function extend (base, extension) {
            if (isUndefined(base)) {
              return copy(extension);
            }
            if (isUndefined(extension)) {
              return copy(base);
            }
            if (isPureObject(base) && isPureObject(extension)) {
              return utils.extendDeep(base, extension);
            }
            return copy(extension);
          }
function extend (base, extension) {
            if (isUndefined(base)) {
              return copy(extension);
            }
            if (isUndefined(extension)) {
              return copy(base);
            }
            if (isPureObject(base) && isPureObject(extension)) {
              return utils.extendDeep(base, extension);
            }
            return copy(extension);
          }
function extend ( base , extension ) { if ( isUndefined ( base ) ) { return copy ( extension ) ; } if ( isUndefined ( extension ) ) { return copy ( base ) ; } if ( isPureObject ( base ) && isPureObject ( extension ) ) { return utils . extendDeep ( base , extension ) ; } return copy ( extension ) ; }
For the base to be extensible, both objects must be pure JavaScript objects.
The function assumes that base is undefined, or null or a pure object.
For the base to be extensible both objects must be pure JavaScript objects . The function assumes that base is undefined or null or a pure object .