1 (function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
6 else if(typeof exports === 'object')
7 exports["fp"] = factory();
9 root["fp"] = factory();
11 return /******/ (function(modules) { // webpackBootstrap
12 /******/ // The module cache
13 /******/ var installedModules = {};
15 /******/ // The require function
16 /******/ function __webpack_require__(moduleId) {
18 /******/ // Check if module is in cache
19 /******/ if(installedModules[moduleId])
20 /******/ return installedModules[moduleId].exports;
22 /******/ // Create a new module (and put it into the cache)
23 /******/ var module = installedModules[moduleId] = {
25 /******/ id: moduleId,
26 /******/ loaded: false
29 /******/ // Execute the module function
30 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
32 /******/ // Flag the module as loaded
33 /******/ module.loaded = true;
35 /******/ // Return the exports of the module
36 /******/ return module.exports;
40 /******/ // expose the modules object (__webpack_modules__)
41 /******/ __webpack_require__.m = modules;
43 /******/ // expose the module cache
44 /******/ __webpack_require__.c = installedModules;
46 /******/ // __webpack_public_path__
47 /******/ __webpack_require__.p = "";
49 /******/ // Load entry module and return exports
50 /******/ return __webpack_require__(0);
52 /************************************************************************/
55 /***/ function(module, exports, __webpack_require__) {
57 var baseConvert = __webpack_require__(1);
60 * Converts `lodash` to an auto-curried iteratee-first data-last version.
62 * @param {Function} lodash The lodash function.
63 * @returns {Function} Returns the converted lodash function.
65 function browserConvert(lodash) {
66 return baseConvert(lodash, lodash);
69 module.exports = browserConvert;
74 /***/ function(module, exports, __webpack_require__) {
76 var mapping = __webpack_require__(2),
77 mutateMap = mapping.mutateMap;
80 * The base implementation of `convert` which accepts a `util` object of methods
81 * required to perform conversions.
83 * @param {Object} util The util object.
84 * @param {string} name The name of the function to wrap.
85 * @param {Function} func The function to wrap.
86 * @returns {Function|Object} Returns the converted function or object.
88 function baseConvert(util, name, func) {
89 if (typeof func != 'function') {
96 var isLib = name === undefined && typeof func.VERSION == 'string';
98 var _ = isLib ? func : {
100 'cloneDeep': util.cloneDeep,
102 'forEach': util.forEach,
103 'isFunction': util.isFunction,
104 'iteratee': util.iteratee,
110 cloneDeep = _.cloneDeep,
113 isFunction = _.isFunction,
117 var baseAry = function(func, n) {
119 var args = arguments,
120 length = Math.min(args.length, n);
123 case 1: return func(args[0]);
124 case 2: return func(args[0], args[1]);
126 args = Array(length);
128 args[length] = arguments[length];
130 return func.apply(undefined, args);
134 var cloneArray = function(array) {
135 var length = array ? array.length : 0,
136 result = Array(length);
139 result[length] = array[length];
144 var createCloner = function(func) {
145 return function(object) {
146 return func({}, object);
150 var immutWrap = function(func, cloner) {
151 return overArg(func, cloner, true);
154 var iterateeAry = function(func, n) {
155 return overArg(func, function(func) {
156 return baseAry(func, n);
160 var overArg = function(func, iteratee, retArg) {
162 var length = arguments.length,
163 args = Array(length);
166 args[length] = arguments[length];
168 args[0] = iteratee(args[0]);
169 var result = func.apply(undefined, args);
170 return retArg ? args[0] : result;
175 'iteratee': function(iteratee) {
176 return function(func, arity) {
177 arity = arity > 2 ? (arity - 2) : 1;
178 func = iteratee(func);
179 var length = func.length;
180 return (length && length <= arity) ? func : baseAry(func, arity);
183 'mixin': function(mixin) {
184 return function(source) {
186 if (!isFunction(func)) {
187 return mixin(func, Object(source));
192 each(keys(source), function(key) {
193 var value = source[key];
194 if (isFunction(value)) {
195 methodNames.push(key);
196 methods.push(func.prototype[key]);
200 mixin(func, Object(source));
202 each(methodNames, function(methodName, index) {
203 var method = methods[index];
204 if (isFunction(method)) {
205 func.prototype[methodName] = method;
207 delete func.prototype[methodName];
213 'runInContext': function(runInContext) {
214 return function(context) {
215 return baseConvert(util, runInContext(context));
220 var wrap = function(name, func) {
221 var wrapper = wrappers[name];
223 return wrapper(func);
225 if (mutateMap.array[name]) {
226 func = immutWrap(func, cloneArray);
228 else if (mutateMap.object[name]) {
229 func = immutWrap(func, createCloner(func));
231 else if (mutateMap.set[name]) {
232 func = immutWrap(func, cloneDeep);
235 each(mapping.caps, function(cap) {
236 each(mapping.aryMethodMap[cap], function(otherName) {
237 if (name == otherName) {
238 result = ary(func, cap);
239 if (cap > 1 && !mapping.skipReargMap[name]) {
240 result = rearg(result, mapping.methodReargMap[name] || mapping.aryReargMap[cap]);
242 var n = !isLib && mapping.aryIterateeMap[name];
244 result = iterateeAry(result, n);
247 result = curry(result, cap);
254 return result || func;
258 return wrap(name, func);
260 // Iterate over methods for the current ary cap.
262 each(mapping.caps, function(cap) {
263 each(mapping.aryMethodMap[cap], function(key) {
264 var func = _[mapping.keyMap[key] || key];
266 pairs.push([key, wrap(key, func)]);
271 // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
272 each(pairs, function(pair) {
273 _[pair[0]] = pair[1];
276 // Wrap the lodash method and its aliases.
277 each(keys(_), function(key) {
278 each(mapping.aliasMap[key] || [], function(alias) {
286 module.exports = baseConvert;
291 /***/ function(module, exports) {
295 /** Used to map method names to their aliases. */
298 'overEvery': ['allPass'],
299 'overSome': ['somePass'],
300 'filter': ['whereEq'],
301 'flatten': ['unnest'],
303 'flowRight': ['compose'],
305 'forEachRight': ['eachRight'],
309 'includes': ['contains'],
311 'isEqual': ['equals'],
312 'mapValues': ['mapObj'],
313 'matchesProperty': ['pathEq'],
314 'overArgs': ['useWith'],
315 'omit': ['dissoc', 'omitAll'],
317 'property': ['prop'],
318 'propertyOf': ['propOf'],
322 'zipObject': ['zipObj']
325 /** Used to map method names to their iteratee ary. */
365 /** Used to map ary to method names. */
368 'attempt,ceil,create,curry,curryRight,floor,fromPairs,iteratee,invert,over,' +
369 'overEvery,overSome,memoize,method,methodOf,mixin,rest,reverse,round,' +
370 'runInContext,template,trim,trimLeft,trimRight,uniqueId,words').split(','),
372 'add,ary,assign,at,bind,bindKey,cloneDeepWith,cloneWith,concat,countBy,curryN,' +
373 'curryRightN,debounce,defaults,defaultsDeep,delay,difference,drop,dropRight,' +
374 'dropRightWhile,dropWhile,endsWith,eq,every,extend,filter,find,find,findIndex,' +
375 'findKey,findLast,findLastIndex,findLastKey,flatMap,forEach,forEachRight,' +
376 'forIn,forInRight,forOwn,forOwnRight,get,groupBy,includes,indexBy,indexOf,' +
377 'intersection,invoke,invokeMap,isMatch,lastIndexOf,map,mapKeys,mapValues,' +
378 'matchesProperty,maxBy,mean,minBy,merge,omit,orderBy,overArgs,pad,padLeft,' +
379 'padRight,parseInt,partition,pick,pull,pullAll,pullAt,random,range,rangeRight,' +
380 'rearg,reject,remove,repeat,result,sampleSize,some,sortBy,sortedIndexBy,' +
381 'sortedLastIndexBy,sortedUniqBy,startsWith,subtract,sumBy,take,takeRight,' +
382 'takeRightWhile,takeWhile,throttle,times,truncate,union,uniqBy,without,wrap,' +
383 'xor,zip,zipObject').split(','),
385 'assignWith,clamp,differenceBy,extendWith,getOr,inRange,intersectionBy,' +
386 'isEqualWith,isMatchWith,mergeWith,omitBy,pickBy,pullAllBy,reduce,' +
387 'reduceRight,set,slice,transform,unionBy,xorBy,zipWith').split(','),
392 /** Used to map ary to rearg configs by method ary. */
399 /** Used to map ary to rearg configs by method names. */
403 'reduceRight': [2, 0, 1],
404 'setWith': [3, 2, 1, 0],
406 'transform': [2, 0, 1]
409 /** Used to iterate `mapping.aryMethodMap` keys. */
410 'caps': [1, 2, 3, 4],
412 /** Used to map keys to other keys. */
415 'curryRightN': 'curryRight',
419 /** Used to identify methods which mutate arrays or objects. */
434 'defaultsDeep': true,
446 /** Used to track methods that skip `_.rearg`. */
449 'matchesProperty': true,