Bump to v4.16.4.

This commit is contained in:
John-David Dalton
2016-10-05 19:29:32 -07:00
parent 0961d6edde
commit 52a75b18e4
17 changed files with 167 additions and 120 deletions

View File

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