mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-14 04:37:50 +00:00
Bump to v3.1.0.
This commit is contained in:
committed by
John-David Dalton
parent
f11f2385a6
commit
27d65e814a
@@ -1,5 +1,5 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.uniq v3.0.1
|
||||
# lodash.uniq v3.1.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.uniq` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var uniq = require('lodash.uniq');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.uniq) for more details.
|
||||
See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.uniq) for more details.
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/**
|
||||
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
|
||||
* lodash 3.1.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
||||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseCallback = require('lodash._basecallback'),
|
||||
baseUniq = require('lodash._baseuniq'),
|
||||
isIterateeCall = require('lodash._isiterateecall');
|
||||
isIterateeCall = require('lodash._isiterateecall'),
|
||||
isArray = require('lodash.isarray'),
|
||||
isNative = require('lodash.isnative');
|
||||
|
||||
/**
|
||||
* An implementation of `_.uniq` optimized for sorted arrays without support
|
||||
@@ -39,12 +41,14 @@ function sortedUniq(array, iteratee) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a duplicate-value-free version of an array using `SameValueZero`
|
||||
* for equality comparisons. Providing `true` for `isSorted` performs a faster
|
||||
* search algorithm for sorted arrays. If an iteratee function is provided it
|
||||
* is invoked for each value in the array to generate the criterion by which
|
||||
* uniqueness is computed. The `iteratee` is bound to `thisArg` and invoked
|
||||
* with three arguments: (value, index, array).
|
||||
* Creates a duplicate-free version of an array, using
|
||||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* for equality comparisons, in which only the first occurence of each element
|
||||
* is kept. Providing `true` for `isSorted` performs a faster search algorithm
|
||||
* for sorted arrays. If an iteratee function is provided it is invoked for
|
||||
* each element in the array to generate the criterion by which uniqueness
|
||||
* is computed. The `iteratee` is bound to `thisArg` and invoked with three
|
||||
* arguments: (value, index, array).
|
||||
*
|
||||
* If a property name is provided for `iteratee` the created `_.property`
|
||||
* style callback returns the property value of the given element.
|
||||
@@ -57,10 +61,6 @@ function sortedUniq(array, iteratee) {
|
||||
* callback returns `true` for elements that have the properties of the given
|
||||
* object, else `false`.
|
||||
*
|
||||
* **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* comparisons are like strict equality comparisons, e.g. `===`, except that
|
||||
* `NaN` matches `NaN`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias unique
|
||||
@@ -72,8 +72,8 @@ function sortedUniq(array, iteratee) {
|
||||
* @returns {Array} Returns the new duplicate-value-free array.
|
||||
* @example
|
||||
*
|
||||
* _.uniq([1, 2, 1]);
|
||||
* // => [1, 2]
|
||||
* _.uniq([2, 1, 2]);
|
||||
* // => [2, 1]
|
||||
*
|
||||
* // using `isSorted`
|
||||
* _.uniq([1, 1, 2], true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.uniq",
|
||||
"version": "3.0.1",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.uniq` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -19,6 +19,8 @@
|
||||
"dependencies": {
|
||||
"lodash._basecallback": "^3.0.0",
|
||||
"lodash._baseuniq": "^3.0.0",
|
||||
"lodash._isiterateecall": "^3.0.0"
|
||||
"lodash._isiterateecall": "^3.0.0",
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.isnative": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user