index.js
/**
   * This has been pulled from the jQuery core and modified slightly. see http://api.jquery.com/jQuery.extend/
   * @param {object} target
   * @param {object} object add one or more object to extend the target.
   * @returns {object} returns the extended object.
   * @memberOf global.excelFormulaUtilities.core
   */
This has been pulled from the jQuery core and modified slightly.
This has been pulled from the jQuery core and modified slightly .
static extend() {
    var options,
      name,
      src,
      copy,
      copyIsArray,
      clone,
      target = arguments[0] || {},
      i = 1,
      length = arguments.length,
      deep = false;
    if (typeof target === "boolean") {
      deep = target;
      target = arguments[1] || {};
      i = 2;
    }
    if (typeof target !== "object" && !isFunction(target)) {
      target = {};
    }
    if (length === i) {
      target = this;
      --i;
    }
    for (; i < length; i++) {
      if ((options = arguments[i]) != null) {
        for (name in options) {
          src = target[name];
          copy = options[name];
          if (target === copy) {
            continue;
          }
          if (
            deep &&
            copy &&
            (this.isPlainObject(copy) || (copyIsArray = this.isArray(copy)))
          ) {
            if (copyIsArray) {
              copyIsArray = false;
              clone = src && this.isArray(src) ? src : [];
            } else {
              clone = src && this.isPlainObject(src) ? src : {};
            }
            target[name] = core.extend(deep, clone, copy);
          } else if (copy !== undefined) {
            target[name] = copy;
          }
        }
      }
    }
    return target;
  }
static extend ( ) { var options , name , src , copy , copyIsArray , clone , target = arguments [ 0 ] || { } , i = 1 , length = arguments . length , deep = false ; if ( typeof target === "boolean" ) { deep = target ; target = arguments [ 1 ] || { } ; i = 2 ; } if ( typeof target !== "object" && ! isFunction ( target ) ) { target = { } ; } if ( length === i ) { target = this ; -- i ; } for ( ; i < length ; i ++ ) { if ( ( options = arguments [ i ] ) != null ) { for ( name in options ) { src = target [ name ] ; copy = options [ name ] ; if ( target === copy ) { continue ; } if ( deep && copy && ( this . isPlainObject ( copy ) || ( copyIsArray = this . isArray ( copy ) ) ) ) { if ( copyIsArray ) { copyIsArray = false ; clone = src && this . isArray ( src ) ? src : [ ] ; } else { clone = src && this . isPlainObject ( src ) ? src : { } ; } target [ name ] = core . extend ( deep , clone , copy ) ; } else if ( copy !== undefined ) { target [ name ] = copy ; } } } } return target ; }
This has been pulled from the jQuery core and modified slightly.
This has been pulled from the jQuery core and modified slightly .
// Handle a deep copy situation // skip the boolean and the target // Handle case when target is a string or something (possible in deep copy) // extend jQuery itself if only one argument is passed // Only deal with non-null/undefined values // Extend the base object // Prevent never-ending loop // Recurse if we're merging plain objects or arrays // Never move original objects, clone them // Don't bring in undefined values // Return the modified object