Repository URL to install this package:
|
Version:
5.0.0-rc.11 ▾
|
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var index = require('../object-visit/index.js');
var index$1 = require('../map-visit/index.js');
var collectionVisit = function(collection, method, val) {
var result;
if (typeof val === 'string' && (method in collection)) {
var args = [].slice.call(arguments, 2);
result = collection[method].apply(collection, args);
} else if (Array.isArray(val)) {
result = index$1.default.apply(null, arguments);
} else {
result = index.default.apply(null, arguments);
}
if (typeof result !== 'undefined') {
return result;
}
return collection;
};
exports.__moduleExports = collectionVisit;
exports.default = collectionVisit;
//# sourceMappingURL=index.js.map