Sha256: 35f8f2e8d83e1af1a18fa6043dd64387246ebf8886c446afb9a9edf5cb8316e4

Contents?: true

Size: 1.04 KB

Versions: 273

Compression:

Stored size: 1.04 KB

Contents

var baseDifference = require('./_baseDifference'),
    baseFlatten = require('./_baseFlatten'),
    baseRest = require('./_baseRest'),
    isArrayLikeObject = require('./isArrayLikeObject');

/**
 * Creates an array of `array` values not included in the other given arrays
 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * for equality comparisons. The order and references of result values are
 * determined by the first array.
 *
 * **Note:** Unlike `_.pullAll`, this method returns a new array.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Array
 * @param {Array} array The array to inspect.
 * @param {...Array} [values] The values to exclude.
 * @returns {Array} Returns the new array of filtered values.
 * @see _.without, _.xor
 * @example
 *
 * _.difference([2, 1], [2, 3]);
 * // => [1]
 */
var difference = baseRest(function(array, values) {
  return isArrayLikeObject(array)
    ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
    : [];
});

module.exports = difference;

Version data entries

273 entries across 271 versions & 29 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/lodash/difference.js
immosquare-cleaner-0.1.59 node_modules/lodash/difference.js
immosquare-cleaner-0.1.58 node_modules/lodash/difference.js
immosquare-cleaner-0.1.57 node_modules/lodash/difference.js
immosquare-cleaner-0.1.56 node_modules/lodash/difference.js
immosquare-cleaner-0.1.55 node_modules/lodash/difference.js
immosquare-cleaner-0.1.54 node_modules/lodash/difference.js
immosquare-cleaner-0.1.53 node_modules/lodash/difference.js
immosquare-cleaner-0.1.52 node_modules/lodash/difference.js
trusty-cms-6.3.1 node_modules/lodash/difference.js
immosquare-cleaner-0.1.51 node_modules/lodash/difference.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/difference.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/difference.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/difference.js
immosquare-cleaner-0.1.50 node_modules/lodash/difference.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/difference.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/difference.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/difference.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/difference.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/difference.js