Bump to v4.16.2.

This commit is contained in:
John-David Dalton
2016-09-25 13:37:46 -07:00
parent 81b88ae10c
commit 2f8450b523
28 changed files with 212 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
define(['./_arrayShuffle', './_baseClamp'], function(arrayShuffle, baseClamp) {
define(['./_copyArray', './_shuffleSelf'], function(copyArray, shuffleSelf) {
/**
* A specialized version of `_.sampleSize` for arrays.
@@ -9,9 +9,7 @@ define(['./_arrayShuffle', './_baseClamp'], function(arrayShuffle, baseClamp) {
* @returns {Array} Returns the random elements.
*/
function arraySampleSize(array, n) {
var result = arrayShuffle(array);
result.length = baseClamp(n, 0, result.length);
return result;
return shuffleSelf(copyArray(array), n);
}
return arraySampleSize;