📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-02 06:17:56
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
node_modules
/
lodash
📍 /home/orkouolp/web/testing.orkobd/laravel/node_modules/lodash
🔄 Refresh
✏️
Editing: sample.js
Writable
var arraySample = require('./_arraySample'), baseSample = require('./_baseSample'), isArray = require('./isArray'); /** * Gets a random element from `collection`. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. * @returns {*} Returns the random element. * @example * * _.sample([1, 2, 3, 4]); * // => 2 */ function sample(collection) { var func = isArray(collection) ? arraySample : baseSample; return func(collection); } module.exports = sample;
💾 Save Changes
❌ Cancel