From 8176d56c725489156e19d68aeaf8851d313f4446 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 6 Sep 2016 14:24:53 -0700 Subject: [PATCH] Move `arraySample` definition to fix builds. --- lodash.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lodash.js b/lodash.js index bc2674b3d..03a0b6b8c 100644 --- a/lodash.js +++ b/lodash.js @@ -712,19 +712,6 @@ return accumulator; } - /** - * A specialized version of `_.sample` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. - */ - function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; - } - /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. @@ -2392,6 +2379,19 @@ return result; } + /** + * A specialized version of `_.sample` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + /** * Used by `_.defaults` to customize its `_.assignIn` use. *