"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/lodash._basedifference/index.js" (8 Mar 2017, 19709 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * lodash (Custom Build) <https://lodash.com/>
    3  * Build: `lodash modularize exports="npm" -o ./`
    4  * Copyright jQuery Foundation and other contributors <https://jquery.org/>
    5  * Released under MIT license <https://lodash.com/license>
    6  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
    7  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
    8  */
    9 var root = require('lodash._root');
   10 
   11 /** Used as the size to enable large array optimizations. */
   12 var LARGE_ARRAY_SIZE = 200;
   13 
   14 /** Used to stand-in for `undefined` hash values. */
   15 var HASH_UNDEFINED = '__lodash_hash_undefined__';
   16 
   17 /** `Object#toString` result references. */
   18 var funcTag = '[object Function]',
   19     genTag = '[object GeneratorFunction]';
   20 
   21 /**
   22  * Used to match `RegExp`
   23  * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
   24  */
   25 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
   26 
   27 /** Used to detect host constructors (Safari). */
   28 var reIsHostCtor = /^\[object .+?Constructor\]$/;
   29 
   30 /**
   31  * A specialized version of `_.includes` for arrays without support for
   32  * specifying an index to search from.
   33  *
   34  * @private
   35  * @param {Array} array The array to search.
   36  * @param {*} target The value to search for.
   37  * @returns {boolean} Returns `true` if `target` is found, else `false`.
   38  */
   39 function arrayIncludes(array, value) {
   40   return !!array.length && baseIndexOf(array, value, 0) > -1;
   41 }
   42 
   43 /**
   44  * This function is like `arrayIncludes` except that it accepts a comparator.
   45  *
   46  * @private
   47  * @param {Array} array The array to search.
   48  * @param {*} target The value to search for.
   49  * @param {Function} comparator The comparator invoked per element.
   50  * @returns {boolean} Returns `true` if `target` is found, else `false`.
   51  */
   52 function arrayIncludesWith(array, value, comparator) {
   53   var index = -1,
   54       length = array.length;
   55 
   56   while (++index < length) {
   57     if (comparator(value, array[index])) {
   58       return true;
   59     }
   60   }
   61   return false;
   62 }
   63 
   64 /**
   65  * A specialized version of `_.map` for arrays without support for iteratee
   66  * shorthands.
   67  *
   68  * @private
   69  * @param {Array} array The array to iterate over.
   70  * @param {Function} iteratee The function invoked per iteration.
   71  * @returns {Array} Returns the new mapped array.
   72  */
   73 function arrayMap(array, iteratee) {
   74   var index = -1,
   75       length = array.length,
   76       result = Array(length);
   77 
   78   while (++index < length) {
   79     result[index] = iteratee(array[index], index, array);
   80   }
   81   return result;
   82 }
   83 
   84 /**
   85  * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
   86  *
   87  * @private
   88  * @param {Array} array The array to search.
   89  * @param {*} value The value to search for.
   90  * @param {number} fromIndex The index to search from.
   91  * @returns {number} Returns the index of the matched value, else `-1`.
   92  */
   93 function baseIndexOf(array, value, fromIndex) {
   94   if (value !== value) {
   95     return indexOfNaN(array, fromIndex);
   96   }
   97   var index = fromIndex - 1,
   98       length = array.length;
   99 
  100   while (++index < length) {
  101     if (array[index] === value) {
  102       return index;
  103     }
  104   }
  105   return -1;
  106 }
  107 
  108 /**
  109  * The base implementation of `_.unary` without support for storing wrapper metadata.
  110  *
  111  * @private
  112  * @param {Function} func The function to cap arguments for.
  113  * @returns {Function} Returns the new capped function.
  114  */
  115 function baseUnary(func) {
  116   return function(value) {
  117     return func(value);
  118   };
  119 }
  120 
  121 /**
  122  * Checks if a cache value for `key` exists.
  123  *
  124  * @private
  125  * @param {Object} cache The cache to query.
  126  * @param {string} key The key of the entry to check.
  127  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  128  */
  129 function cacheHas(cache, key) {
  130   return cache.has(key);
  131 }
  132 
  133 /**
  134  * Gets the index at which the first occurrence of `NaN` is found in `array`.
  135  *
  136  * @private
  137  * @param {Array} array The array to search.
  138  * @param {number} fromIndex The index to search from.
  139  * @param {boolean} [fromRight] Specify iterating from right to left.
  140  * @returns {number} Returns the index of the matched `NaN`, else `-1`.
  141  */
  142 function indexOfNaN(array, fromIndex, fromRight) {
  143   var length = array.length,
  144       index = fromIndex + (fromRight ? 0 : -1);
  145 
  146   while ((fromRight ? index-- : ++index < length)) {
  147     var other = array[index];
  148     if (other !== other) {
  149       return index;
  150     }
  151   }
  152   return -1;
  153 }
  154 
  155 /**
  156  * Checks if `value` is a host object in IE < 9.
  157  *
  158  * @private
  159  * @param {*} value The value to check.
  160  * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  161  */
  162 function isHostObject(value) {
  163   // Many host objects are `Object` objects that can coerce to strings
  164   // despite having improperly defined `toString` methods.
  165   var result = false;
  166   if (value != null && typeof value.toString != 'function') {
  167     try {
  168       result = !!(value + '');
  169     } catch (e) {}
  170   }
  171   return result;
  172 }
  173 
  174 /** Used for built-in method references. */
  175 var arrayProto = Array.prototype,
  176     objectProto = Object.prototype;
  177 
  178 /** Used to resolve the decompiled source of functions. */
  179 var funcToString = Function.prototype.toString;
  180 
  181 /** Used to check objects for own properties. */
  182 var hasOwnProperty = objectProto.hasOwnProperty;
  183 
  184 /**
  185  * Used to resolve the
  186  * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  187  * of values.
  188  */
  189 var objectToString = objectProto.toString;
  190 
  191 /** Used to detect if a method is native. */
  192 var reIsNative = RegExp('^' +
  193   funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  194   .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  195 );
  196 
  197 /** Built-in value references. */
  198 var splice = arrayProto.splice;
  199 
  200 /* Built-in method references that are verified to be native. */
  201 var Map = getNative(root, 'Map'),
  202     nativeCreate = getNative(Object, 'create');
  203 
  204 /**
  205  * Creates a hash object.
  206  *
  207  * @private
  208  * @constructor
  209  * @param {Array} [entries] The key-value pairs to cache.
  210  */
  211 function Hash(entries) {
  212   var index = -1,
  213       length = entries ? entries.length : 0;
  214 
  215   this.clear();
  216   while (++index < length) {
  217     var entry = entries[index];
  218     this.set(entry[0], entry[1]);
  219   }
  220 }
  221 
  222 /**
  223  * Removes all key-value entries from the hash.
  224  *
  225  * @private
  226  * @name clear
  227  * @memberOf Hash
  228  */
  229 function hashClear() {
  230   this.__data__ = nativeCreate ? nativeCreate(null) : {};
  231 }
  232 
  233 /**
  234  * Removes `key` and its value from the hash.
  235  *
  236  * @private
  237  * @name delete
  238  * @memberOf Hash
  239  * @param {Object} hash The hash to modify.
  240  * @param {string} key The key of the value to remove.
  241  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  242  */
  243 function hashDelete(key) {
  244   return this.has(key) && delete this.__data__[key];
  245 }
  246 
  247 /**
  248  * Gets the hash value for `key`.
  249  *
  250  * @private
  251  * @name get
  252  * @memberOf Hash
  253  * @param {string} key The key of the value to get.
  254  * @returns {*} Returns the entry value.
  255  */
  256 function hashGet(key) {
  257   var data = this.__data__;
  258   if (nativeCreate) {
  259     var result = data[key];
  260     return result === HASH_UNDEFINED ? undefined : result;
  261   }
  262   return hasOwnProperty.call(data, key) ? data[key] : undefined;
  263 }
  264 
  265 /**
  266  * Checks if a hash value for `key` exists.
  267  *
  268  * @private
  269  * @name has
  270  * @memberOf Hash
  271  * @param {string} key The key of the entry to check.
  272  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  273  */
  274 function hashHas(key) {
  275   var data = this.__data__;
  276   return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  277 }
  278 
  279 /**
  280  * Sets the hash `key` to `value`.
  281  *
  282  * @private
  283  * @name set
  284  * @memberOf Hash
  285  * @param {string} key The key of the value to set.
  286  * @param {*} value The value to set.
  287  * @returns {Object} Returns the hash instance.
  288  */
  289 function hashSet(key, value) {
  290   var data = this.__data__;
  291   data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  292   return this;
  293 }
  294 
  295 // Add methods to `Hash`.
  296 Hash.prototype.clear = hashClear;
  297 Hash.prototype['delete'] = hashDelete;
  298 Hash.prototype.get = hashGet;
  299 Hash.prototype.has = hashHas;
  300 Hash.prototype.set = hashSet;
  301 
  302 /**
  303  * Creates an list cache object.
  304  *
  305  * @private
  306  * @constructor
  307  * @param {Array} [entries] The key-value pairs to cache.
  308  */
  309 function ListCache(entries) {
  310   var index = -1,
  311       length = entries ? entries.length : 0;
  312 
  313   this.clear();
  314   while (++index < length) {
  315     var entry = entries[index];
  316     this.set(entry[0], entry[1]);
  317   }
  318 }
  319 
  320 /**
  321  * Removes all key-value entries from the list cache.
  322  *
  323  * @private
  324  * @name clear
  325  * @memberOf ListCache
  326  */
  327 function listCacheClear() {
  328   this.__data__ = [];
  329 }
  330 
  331 /**
  332  * Removes `key` and its value from the list cache.
  333  *
  334  * @private
  335  * @name delete
  336  * @memberOf ListCache
  337  * @param {string} key The key of the value to remove.
  338  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  339  */
  340 function listCacheDelete(key) {
  341   var data = this.__data__,
  342       index = assocIndexOf(data, key);
  343 
  344   if (index < 0) {
  345     return false;
  346   }
  347   var lastIndex = data.length - 1;
  348   if (index == lastIndex) {
  349     data.pop();
  350   } else {
  351     splice.call(data, index, 1);
  352   }
  353   return true;
  354 }
  355 
  356 /**
  357  * Gets the list cache value for `key`.
  358  *
  359  * @private
  360  * @name get
  361  * @memberOf ListCache
  362  * @param {string} key The key of the value to get.
  363  * @returns {*} Returns the entry value.
  364  */
  365 function listCacheGet(key) {
  366   var data = this.__data__,
  367       index = assocIndexOf(data, key);
  368 
  369   return index < 0 ? undefined : data[index][1];
  370 }
  371 
  372 /**
  373  * Checks if a list cache value for `key` exists.
  374  *
  375  * @private
  376  * @name has
  377  * @memberOf ListCache
  378  * @param {string} key The key of the entry to check.
  379  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  380  */
  381 function listCacheHas(key) {
  382   return assocIndexOf(this.__data__, key) > -1;
  383 }
  384 
  385 /**
  386  * Sets the list cache `key` to `value`.
  387  *
  388  * @private
  389  * @name set
  390  * @memberOf ListCache
  391  * @param {string} key The key of the value to set.
  392  * @param {*} value The value to set.
  393  * @returns {Object} Returns the list cache instance.
  394  */
  395 function listCacheSet(key, value) {
  396   var data = this.__data__,
  397       index = assocIndexOf(data, key);
  398 
  399   if (index < 0) {
  400     data.push([key, value]);
  401   } else {
  402     data[index][1] = value;
  403   }
  404   return this;
  405 }
  406 
  407 // Add methods to `ListCache`.
  408 ListCache.prototype.clear = listCacheClear;
  409 ListCache.prototype['delete'] = listCacheDelete;
  410 ListCache.prototype.get = listCacheGet;
  411 ListCache.prototype.has = listCacheHas;
  412 ListCache.prototype.set = listCacheSet;
  413 
  414 /**
  415  * Creates a map cache object to store key-value pairs.
  416  *
  417  * @private
  418  * @constructor
  419  * @param {Array} [entries] The key-value pairs to cache.
  420  */
  421 function MapCache(entries) {
  422   var index = -1,
  423       length = entries ? entries.length : 0;
  424 
  425   this.clear();
  426   while (++index < length) {
  427     var entry = entries[index];
  428     this.set(entry[0], entry[1]);
  429   }
  430 }
  431 
  432 /**
  433  * Removes all key-value entries from the map.
  434  *
  435  * @private
  436  * @name clear
  437  * @memberOf MapCache
  438  */
  439 function mapCacheClear() {
  440   this.__data__ = {
  441     'hash': new Hash,
  442     'map': new (Map || ListCache),
  443     'string': new Hash
  444   };
  445 }
  446 
  447 /**
  448  * Removes `key` and its value from the map.
  449  *
  450  * @private
  451  * @name delete
  452  * @memberOf MapCache
  453  * @param {string} key The key of the value to remove.
  454  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  455  */
  456 function mapCacheDelete(key) {
  457   return getMapData(this, key)['delete'](key);
  458 }
  459 
  460 /**
  461  * Gets the map value for `key`.
  462  *
  463  * @private
  464  * @name get
  465  * @memberOf MapCache
  466  * @param {string} key The key of the value to get.
  467  * @returns {*} Returns the entry value.
  468  */
  469 function mapCacheGet(key) {
  470   return getMapData(this, key).get(key);
  471 }
  472 
  473 /**
  474  * Checks if a map value for `key` exists.
  475  *
  476  * @private
  477  * @name has
  478  * @memberOf MapCache
  479  * @param {string} key The key of the entry to check.
  480  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  481  */
  482 function mapCacheHas(key) {
  483   return getMapData(this, key).has(key);
  484 }
  485 
  486 /**
  487  * Sets the map `key` to `value`.
  488  *
  489  * @private
  490  * @name set
  491  * @memberOf MapCache
  492  * @param {string} key The key of the value to set.
  493  * @param {*} value The value to set.
  494  * @returns {Object} Returns the map cache instance.
  495  */
  496 function mapCacheSet(key, value) {
  497   getMapData(this, key).set(key, value);
  498   return this;
  499 }
  500 
  501 // Add methods to `MapCache`.
  502 MapCache.prototype.clear = mapCacheClear;
  503 MapCache.prototype['delete'] = mapCacheDelete;
  504 MapCache.prototype.get = mapCacheGet;
  505 MapCache.prototype.has = mapCacheHas;
  506 MapCache.prototype.set = mapCacheSet;
  507 
  508 /**
  509  *
  510  * Creates an array cache object to store unique values.
  511  *
  512  * @private
  513  * @constructor
  514  * @param {Array} [values] The values to cache.
  515  */
  516 function SetCache(values) {
  517   var index = -1,
  518       length = values ? values.length : 0;
  519 
  520   this.__data__ = new MapCache;
  521   while (++index < length) {
  522     this.add(values[index]);
  523   }
  524 }
  525 
  526 /**
  527  * Adds `value` to the array cache.
  528  *
  529  * @private
  530  * @name add
  531  * @memberOf SetCache
  532  * @alias push
  533  * @param {*} value The value to cache.
  534  * @returns {Object} Returns the cache instance.
  535  */
  536 function setCacheAdd(value) {
  537   this.__data__.set(value, HASH_UNDEFINED);
  538   return this;
  539 }
  540 
  541 /**
  542  * Checks if `value` is in the array cache.
  543  *
  544  * @private
  545  * @name has
  546  * @memberOf SetCache
  547  * @param {*} value The value to search for.
  548  * @returns {number} Returns `true` if `value` is found, else `false`.
  549  */
  550 function setCacheHas(value) {
  551   return this.__data__.has(value);
  552 }
  553 
  554 // Add methods to `SetCache`.
  555 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  556 SetCache.prototype.has = setCacheHas;
  557 
  558 /**
  559  * Gets the index at which the `key` is found in `array` of key-value pairs.
  560  *
  561  * @private
  562  * @param {Array} array The array to search.
  563  * @param {*} key The key to search for.
  564  * @returns {number} Returns the index of the matched value, else `-1`.
  565  */
  566 function assocIndexOf(array, key) {
  567   var length = array.length;
  568   while (length--) {
  569     if (eq(array[length][0], key)) {
  570       return length;
  571     }
  572   }
  573   return -1;
  574 }
  575 
  576 /**
  577  * The base implementation of methods like `_.difference` without support
  578  * for excluding multiple arrays or iteratee shorthands.
  579  *
  580  * @private
  581  * @param {Array} array The array to inspect.
  582  * @param {Array} values The values to exclude.
  583  * @param {Function} [iteratee] The iteratee invoked per element.
  584  * @param {Function} [comparator] The comparator invoked per element.
  585  * @returns {Array} Returns the new array of filtered values.
  586  */
  587 function baseDifference(array, values, iteratee, comparator) {
  588   var index = -1,
  589       includes = arrayIncludes,
  590       isCommon = true,
  591       length = array.length,
  592       result = [],
  593       valuesLength = values.length;
  594 
  595   if (!length) {
  596     return result;
  597   }
  598   if (iteratee) {
  599     values = arrayMap(values, baseUnary(iteratee));
  600   }
  601   if (comparator) {
  602     includes = arrayIncludesWith;
  603     isCommon = false;
  604   }
  605   else if (values.length >= LARGE_ARRAY_SIZE) {
  606     includes = cacheHas;
  607     isCommon = false;
  608     values = new SetCache(values);
  609   }
  610   outer:
  611   while (++index < length) {
  612     var value = array[index],
  613         computed = iteratee ? iteratee(value) : value;
  614 
  615     value = (comparator || value !== 0) ? value : 0;
  616     if (isCommon && computed === computed) {
  617       var valuesIndex = valuesLength;
  618       while (valuesIndex--) {
  619         if (values[valuesIndex] === computed) {
  620           continue outer;
  621         }
  622       }
  623       result.push(value);
  624     }
  625     else if (!includes(values, computed, comparator)) {
  626       result.push(value);
  627     }
  628   }
  629   return result;
  630 }
  631 
  632 /**
  633  * Gets the data for `map`.
  634  *
  635  * @private
  636  * @param {Object} map The map to query.
  637  * @param {string} key The reference key.
  638  * @returns {*} Returns the map data.
  639  */
  640 function getMapData(map, key) {
  641   var data = map.__data__;
  642   return isKeyable(key)
  643     ? data[typeof key == 'string' ? 'string' : 'hash']
  644     : data.map;
  645 }
  646 
  647 /**
  648  * Gets the native function at `key` of `object`.
  649  *
  650  * @private
  651  * @param {Object} object The object to query.
  652  * @param {string} key The key of the method to get.
  653  * @returns {*} Returns the function if it's native, else `undefined`.
  654  */
  655 function getNative(object, key) {
  656   var value = object[key];
  657   return isNative(value) ? value : undefined;
  658 }
  659 
  660 /**
  661  * Checks if `value` is suitable for use as unique object key.
  662  *
  663  * @private
  664  * @param {*} value The value to check.
  665  * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  666  */
  667 function isKeyable(value) {
  668   var type = typeof value;
  669   return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  670     ? (value !== '__proto__')
  671     : (value === null);
  672 }
  673 
  674 /**
  675  * Converts `func` to its source code.
  676  *
  677  * @private
  678  * @param {Function} func The function to process.
  679  * @returns {string} Returns the source code.
  680  */
  681 function toSource(func) {
  682   if (func != null) {
  683     try {
  684       return funcToString.call(func);
  685     } catch (e) {}
  686     try {
  687       return (func + '');
  688     } catch (e) {}
  689   }
  690   return '';
  691 }
  692 
  693 /**
  694  * Performs a
  695  * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
  696  * comparison between two values to determine if they are equivalent.
  697  *
  698  * @static
  699  * @memberOf _
  700  * @since 4.0.0
  701  * @category Lang
  702  * @param {*} value The value to compare.
  703  * @param {*} other The other value to compare.
  704  * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  705  * @example
  706  *
  707  * var object = { 'user': 'fred' };
  708  * var other = { 'user': 'fred' };
  709  *
  710  * _.eq(object, object);
  711  * // => true
  712  *
  713  * _.eq(object, other);
  714  * // => false
  715  *
  716  * _.eq('a', 'a');
  717  * // => true
  718  *
  719  * _.eq('a', Object('a'));
  720  * // => false
  721  *
  722  * _.eq(NaN, NaN);
  723  * // => true
  724  */
  725 function eq(value, other) {
  726   return value === other || (value !== value && other !== other);
  727 }
  728 
  729 /**
  730  * Checks if `value` is classified as a `Function` object.
  731  *
  732  * @static
  733  * @memberOf _
  734  * @since 0.1.0
  735  * @category Lang
  736  * @param {*} value The value to check.
  737  * @returns {boolean} Returns `true` if `value` is correctly classified,
  738  *  else `false`.
  739  * @example
  740  *
  741  * _.isFunction(_);
  742  * // => true
  743  *
  744  * _.isFunction(/abc/);
  745  * // => false
  746  */
  747 function isFunction(value) {
  748   // The use of `Object#toString` avoids issues with the `typeof` operator
  749   // in Safari 8 which returns 'object' for typed array and weak map constructors,
  750   // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
  751   var tag = isObject(value) ? objectToString.call(value) : '';
  752   return tag == funcTag || tag == genTag;
  753 }
  754 
  755 /**
  756  * Checks if `value` is the
  757  * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
  758  * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  759  *
  760  * @static
  761  * @memberOf _
  762  * @since 0.1.0
  763  * @category Lang
  764  * @param {*} value The value to check.
  765  * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  766  * @example
  767  *
  768  * _.isObject({});
  769  * // => true
  770  *
  771  * _.isObject([1, 2, 3]);
  772  * // => true
  773  *
  774  * _.isObject(_.noop);
  775  * // => true
  776  *
  777  * _.isObject(null);
  778  * // => false
  779  */
  780 function isObject(value) {
  781   var type = typeof value;
  782   return !!value && (type == 'object' || type == 'function');
  783 }
  784 
  785 /**
  786  * Checks if `value` is a native function.
  787  *
  788  * @static
  789  * @memberOf _
  790  * @since 3.0.0
  791  * @category Lang
  792  * @param {*} value The value to check.
  793  * @returns {boolean} Returns `true` if `value` is a native function,
  794  *  else `false`.
  795  * @example
  796  *
  797  * _.isNative(Array.prototype.push);
  798  * // => true
  799  *
  800  * _.isNative(_);
  801  * // => false
  802  */
  803 function isNative(value) {
  804   if (!isObject(value)) {
  805     return false;
  806   }
  807   var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  808   return pattern.test(toSource(value));
  809 }
  810 
  811 module.exports = baseDifference;