Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_baseSample.js 359B

123456789101112131415
  1. var arraySample = require('./_arraySample'),
  2. values = require('./values');
  3. /**
  4. * The base implementation of `_.sample`.
  5. *
  6. * @private
  7. * @param {Array|Object} collection The collection to sample.
  8. * @returns {*} Returns the random element.
  9. */
  10. function baseSample(collection) {
  11. return arraySample(values(collection));
  12. }
  13. module.exports = baseSample;