Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
'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