aggiunto di nuovo bower e node, speriamo stavolta vada...

This commit is contained in:
Samuele E. Locatelli
2016-10-13 19:34:59 +02:00
parent e9602ba52e
commit 0badaa018c
2581 changed files with 315857 additions and 1171 deletions
+3 -2
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;