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.

_baseAt.js 569B

1234567891011121314151617181920212223
  1. var get = require('./get');
  2. /**
  3. * The base implementation of `_.at` without support for individual paths.
  4. *
  5. * @private
  6. * @param {Object} object The object to iterate over.
  7. * @param {string[]} paths The property paths to pick.
  8. * @returns {Array} Returns the picked elements.
  9. */
  10. function baseAt(object, paths) {
  11. var index = -1,
  12. length = paths.length,
  13. result = Array(length),
  14. skip = object == null;
  15. while (++index < length) {
  16. result[index] = skip ? undefined : get(object, paths[index]);
  17. }
  18. return result;
  19. }
  20. module.exports = baseAt;