Move internal modules to “internal” folder.

This commit is contained in:
John-David Dalton
2017-01-10 00:44:25 -08:00
parent 2b05673125
commit 26ea38dcf4
500 changed files with 726 additions and 726 deletions

View File

@@ -0,0 +1,18 @@
import baseClamp from './.internal/baseClamp.js';
import shuffleSelf from './.internal/shuffleSelf.js';
import values from './values.js';
/**
* The base implementation of `sampleSize` without param guards.
*
* @private
* @param {Array|Object} collection The collection to sample.
* @param {number} n The number of elements to sample.
* @returns {Array} Returns the random elements.
*/
function baseSampleSize(collection, n) {
const array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
}
export default baseSampleSize;