Bump to v4.16.2.

This commit is contained in:
John-David Dalton
2016-09-25 13:40:14 -07:00
parent 5425ef9a59
commit ab95e7dde7
28 changed files with 128 additions and 47 deletions

View File

@@ -1,6 +1,6 @@
import arraySample from './_arraySample.js';
import isArrayLike from './isArrayLike.js';
import values from './values.js';
import baseSample from './_baseSample.js';
import isArray from './isArray.js';
/**
* Gets a random element from `collection`.
@@ -17,7 +17,8 @@ import values from './values.js';
* // => 2
*/
function sample(collection) {
return arraySample(isArrayLike(collection) ? collection : values(collection));
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
export default sample;