88394f367a1a31e08b784495586ff019e8f7fbcc02716d0368c341e7d7c40de265f6178175d0bbe13be5ddf1f19a02ae2da87b31f0ec3bc689f41571d910f1 632 B

123456789101112131415161718192021222324
  1. import baseInvoke from './_baseInvoke.js';
  2. import baseRest from './_baseRest.js';
  3. /**
  4. * Invokes the method at `path` of `object`.
  5. *
  6. * @static
  7. * @memberOf _
  8. * @since 4.0.0
  9. * @category Object
  10. * @param {Object} object The object to query.
  11. * @param {Array|string} path The path of the method to invoke.
  12. * @param {...*} [args] The arguments to invoke the method with.
  13. * @returns {*} Returns the result of the invoked method.
  14. * @example
  15. *
  16. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  17. *
  18. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  19. * // => [2, 3]
  20. */
  21. var invoke = baseRest(baseInvoke);
  22. export default invoke;