Bump to v4.16.4.

This commit is contained in:
John-David Dalton
2016-10-05 19:49:52 -07:00
parent eb1446def5
commit 39e2b943dc
20 changed files with 324 additions and 291 deletions

View File

@@ -1,4 +1,5 @@
var copyArray = require('./_copyArray'),
var baseClamp = require('./_baseClamp'),
copyArray = require('./_copyArray'),
shuffleSelf = require('./_shuffleSelf');
/**
@@ -10,7 +11,7 @@ var copyArray = require('./_copyArray'),
* @returns {Array} Returns the random elements.
*/
function arraySampleSize(array, n) {
return shuffleSelf(copyArray(array), n);
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
}
module.exports = arraySampleSize;