Bump to v4.16.4.

This commit is contained in:
John-David Dalton
2016-10-05 19:32:45 -07:00
parent d9fd2bdf9c
commit 6778141728
17 changed files with 103 additions and 69 deletions

View File

@@ -1,3 +1,4 @@
import baseClamp from './_baseClamp.js';
import shuffleSelf from './_shuffleSelf.js';
import values from './values.js';
@@ -10,7 +11,8 @@ import values from './values.js';
* @returns {Array} Returns the random elements.
*/
function baseSampleSize(collection, n) {
return shuffleSelf(values(collection), n);
var array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
}
export default baseSampleSize;