[EDIT] FILE: invoke.js.tar
home/koolde6/public_html/lovestrong/server/node_modules/lodash/invoke.js 0000755 00000001172 15073710734 0022644 0 ustar 00 var baseInvoke = require('./_baseInvoke'), baseRest = require('./_baseRest'); /** * Invokes the method at `path` of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. * @returns {*} Returns the result of the invoked method. * @example * * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; * * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ var invoke = baseRest(baseInvoke); module.exports = invoke; home/koolde6/public_html/lovestrong/server/node_modules/lodash/fp/invoke.js 0000755 00000000235 15073742602 0023247 0 ustar 00 var convert = require('./convert'), func = convert('invoke', require('../invoke')); func.placeholder = require('./placeholder'); module.exports = func; home/koolde6/public_html/lovestrong/frontend/node_modules/underscore/cjs/invoke.js 0000755 00000001553 15076242731 0024636 0 ustar 00 var isFunction = require('./isFunction.js'); var _deepGet = require('./_deepGet.js'); var _toPath = require('./_toPath.js'); var restArguments = require('./restArguments.js'); var map = require('./map.js'); // Invoke a method (with arguments) on every item in a collection. var invoke = restArguments(function(obj, path, args) { var contextPath, func; if (isFunction(path)) { func = path; } else { path = _toPath(path); contextPath = path.slice(0, -1); path = path[path.length - 1]; } return map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = _deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); }); module.exports = invoke; home/koolde6/public_html/lovestrong/frontend/node_modules/underscore/amd/invoke.js 0000755 00000001524 15076243302 0024611 0 ustar 00 define(['./isFunction', './_deepGet', './_toPath', './restArguments', './map'], function (isFunction, _deepGet, _toPath, restArguments, map) { // Invoke a method (with arguments) on every item in a collection. var invoke = restArguments(function(obj, path, args) { var contextPath, func; if (isFunction(path)) { func = path; } else { path = _toPath(path); contextPath = path.slice(0, -1); path = path[path.length - 1]; } return map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = _deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); }); return invoke; }); home/koolde6/public_html/lovestrong/frontend/node_modules/lodash/invoke.js 0000755 00000001172 15076504621 0023154 0 ustar 00 var baseInvoke = require('./_baseInvoke'), baseRest = require('./_baseRest'); /** * Invokes the method at `path` of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. * @returns {*} Returns the result of the invoked method. * @example * * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; * * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ var invoke = baseRest(baseInvoke); module.exports = invoke; home/koolde6/public_html/lovestrong/frontend/node_modules/underscore/modules/invoke.js 0000755 00000001500 15076707471 0025526 0 ustar 00 import restArguments from './restArguments.js'; import isFunction from './isFunction.js'; import map from './map.js'; import deepGet from './_deepGet.js'; import toPath from './_toPath.js'; // Invoke a method (with arguments) on every item in a collection. export default restArguments(function(obj, path, args) { var contextPath, func; if (isFunction(path)) { func = path; } else { path = toPath(path); contextPath = path.slice(0, -1); path = path[path.length - 1]; } return map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); });
SAVE
CANCEL