mapping.fp.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["mapping"] = factory();
  8. else
  9. root["mapping"] = factory();
  10. })(this, function() {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/ // The require function
  15. /******/ function __webpack_require__(moduleId) {
  16. /******/ // Check if module is in cache
  17. /******/ if(installedModules[moduleId])
  18. /******/ return installedModules[moduleId].exports;
  19. /******/ // Create a new module (and put it into the cache)
  20. /******/ var module = installedModules[moduleId] = {
  21. /******/ exports: {},
  22. /******/ id: moduleId,
  23. /******/ loaded: false
  24. /******/ };
  25. /******/ // Execute the module function
  26. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  27. /******/ // Flag the module as loaded
  28. /******/ module.loaded = true;
  29. /******/ // Return the exports of the module
  30. /******/ return module.exports;
  31. /******/ }
  32. /******/ // expose the modules object (__webpack_modules__)
  33. /******/ __webpack_require__.m = modules;
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/ // __webpack_public_path__
  37. /******/ __webpack_require__.p = "";
  38. /******/ // Load entry module and return exports
  39. /******/ return __webpack_require__(0);
  40. /******/ })
  41. /************************************************************************/
  42. /******/ ([
  43. /* 0 */
  44. /***/ function(module, exports) {
  45. /** Used to map aliases to their real names. */
  46. exports.aliasToReal = {
  47. // Lodash aliases.
  48. 'each': 'forEach',
  49. 'eachRight': 'forEachRight',
  50. 'entries': 'toPairs',
  51. 'entriesIn': 'toPairsIn',
  52. 'extend': 'assignIn',
  53. 'extendWith': 'assignInWith',
  54. 'first': 'head',
  55. // Ramda aliases.
  56. '__': 'placeholder',
  57. 'all': 'every',
  58. 'allPass': 'overEvery',
  59. 'always': 'constant',
  60. 'any': 'some',
  61. 'anyPass': 'overSome',
  62. 'apply': 'spread',
  63. 'assoc': 'set',
  64. 'assocPath': 'set',
  65. 'complement': 'negate',
  66. 'compose': 'flowRight',
  67. 'contains': 'includes',
  68. 'dissoc': 'unset',
  69. 'dissocPath': 'unset',
  70. 'equals': 'isEqual',
  71. 'identical': 'eq',
  72. 'init': 'initial',
  73. 'invertObj': 'invert',
  74. 'juxt': 'over',
  75. 'omitAll': 'omit',
  76. 'nAry': 'ary',
  77. 'path': 'get',
  78. 'pathEq': 'matchesProperty',
  79. 'pathOr': 'getOr',
  80. 'paths': 'at',
  81. 'pickAll': 'pick',
  82. 'pipe': 'flow',
  83. 'pluck': 'map',
  84. 'prop': 'get',
  85. 'propEq': 'matchesProperty',
  86. 'propOr': 'getOr',
  87. 'props': 'at',
  88. 'unapply': 'rest',
  89. 'unnest': 'flatten',
  90. 'useWith': 'overArgs',
  91. 'whereEq': 'filter',
  92. 'zipObj': 'zipObject'
  93. };
  94. /** Used to map ary to method names. */
  95. exports.aryMethod = {
  96. '1': [
  97. 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
  98. 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
  99. 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
  100. 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
  101. 'uniqueId', 'words'
  102. ],
  103. '2': [
  104. 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
  105. 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
  106. 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
  107. 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
  108. 'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast',
  109. 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
  110. 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
  111. 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
  112. 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
  113. 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
  114. 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
  115. 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
  116. 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
  117. 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
  118. 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
  119. 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
  120. 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
  121. 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
  122. 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
  123. 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
  124. 'zipObjectDeep'
  125. ],
  126. '3': [
  127. 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
  128. 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
  129. 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
  130. 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
  131. 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
  132. 'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
  133. 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
  134. 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
  135. ],
  136. '4': [
  137. 'fill', 'setWith', 'updateWith'
  138. ]
  139. };
  140. /** Used to map ary to rearg configs. */
  141. exports.aryRearg = {
  142. '2': [1, 0],
  143. '3': [2, 0, 1],
  144. '4': [3, 2, 0, 1]
  145. };
  146. /** Used to map method names to their iteratee ary. */
  147. exports.iterateeAry = {
  148. 'dropRightWhile': 1,
  149. 'dropWhile': 1,
  150. 'every': 1,
  151. 'filter': 1,
  152. 'find': 1,
  153. 'findFrom': 1,
  154. 'findIndex': 1,
  155. 'findIndexFrom': 1,
  156. 'findKey': 1,
  157. 'findLast': 1,
  158. 'findLastFrom': 1,
  159. 'findLastIndex': 1,
  160. 'findLastIndexFrom': 1,
  161. 'findLastKey': 1,
  162. 'flatMap': 1,
  163. 'flatMapDeep': 1,
  164. 'flatMapDepth': 1,
  165. 'forEach': 1,
  166. 'forEachRight': 1,
  167. 'forIn': 1,
  168. 'forInRight': 1,
  169. 'forOwn': 1,
  170. 'forOwnRight': 1,
  171. 'map': 1,
  172. 'mapKeys': 1,
  173. 'mapValues': 1,
  174. 'partition': 1,
  175. 'reduce': 2,
  176. 'reduceRight': 2,
  177. 'reject': 1,
  178. 'remove': 1,
  179. 'some': 1,
  180. 'takeRightWhile': 1,
  181. 'takeWhile': 1,
  182. 'times': 1,
  183. 'transform': 2
  184. };
  185. /** Used to map method names to iteratee rearg configs. */
  186. exports.iterateeRearg = {
  187. 'mapKeys': [1]
  188. };
  189. /** Used to map method names to rearg configs. */
  190. exports.methodRearg = {
  191. 'assignInWith': [1, 2, 0],
  192. 'assignWith': [1, 2, 0],
  193. 'differenceBy': [1, 2, 0],
  194. 'differenceWith': [1, 2, 0],
  195. 'getOr': [2, 1, 0],
  196. 'intersectionBy': [1, 2, 0],
  197. 'intersectionWith': [1, 2, 0],
  198. 'isEqualWith': [1, 2, 0],
  199. 'isMatchWith': [2, 1, 0],
  200. 'mergeWith': [1, 2, 0],
  201. 'padChars': [2, 1, 0],
  202. 'padCharsEnd': [2, 1, 0],
  203. 'padCharsStart': [2, 1, 0],
  204. 'pullAllBy': [2, 1, 0],
  205. 'pullAllWith': [2, 1, 0],
  206. 'setWith': [3, 1, 2, 0],
  207. 'sortedIndexBy': [2, 1, 0],
  208. 'sortedLastIndexBy': [2, 1, 0],
  209. 'unionBy': [1, 2, 0],
  210. 'unionWith': [1, 2, 0],
  211. 'updateWith': [3, 1, 2, 0],
  212. 'xorBy': [1, 2, 0],
  213. 'xorWith': [1, 2, 0],
  214. 'zipWith': [1, 2, 0]
  215. };
  216. /** Used to map method names to spread configs. */
  217. exports.methodSpread = {
  218. 'invokeArgs': 2,
  219. 'invokeArgsMap': 2,
  220. 'partial': 1,
  221. 'partialRight': 1,
  222. 'without': 1
  223. };
  224. /** Used to identify methods which mutate arrays or objects. */
  225. exports.mutate = {
  226. 'array': {
  227. 'fill': true,
  228. 'pull': true,
  229. 'pullAll': true,
  230. 'pullAllBy': true,
  231. 'pullAllWith': true,
  232. 'pullAt': true,
  233. 'remove': true,
  234. 'reverse': true
  235. },
  236. 'object': {
  237. 'assign': true,
  238. 'assignIn': true,
  239. 'assignInWith': true,
  240. 'assignWith': true,
  241. 'defaults': true,
  242. 'defaultsDeep': true,
  243. 'merge': true,
  244. 'mergeWith': true
  245. },
  246. 'set': {
  247. 'set': true,
  248. 'setWith': true,
  249. 'unset': true,
  250. 'update': true,
  251. 'updateWith': true
  252. }
  253. };
  254. /** Used to track methods with placeholder support */
  255. exports.placeholder = {
  256. 'bind': true,
  257. 'bindKey': true,
  258. 'curry': true,
  259. 'curryRight': true,
  260. 'partial': true,
  261. 'partialRight': true
  262. };
  263. /** Used to map real names to their aliases. */
  264. exports.realToAlias = (function() {
  265. var hasOwnProperty = Object.prototype.hasOwnProperty,
  266. object = exports.aliasToReal,
  267. result = {};
  268. for (var key in object) {
  269. var value = object[key];
  270. if (hasOwnProperty.call(result, value)) {
  271. result[value].push(key);
  272. } else {
  273. result[value] = [key];
  274. }
  275. }
  276. return result;
  277. }());
  278. /** Used to map method names to other names. */
  279. exports.remap = {
  280. 'curryN': 'curry',
  281. 'curryRightN': 'curryRight',
  282. 'findFrom': 'find',
  283. 'findIndexFrom': 'findIndex',
  284. 'findLastFrom': 'findLast',
  285. 'findLastIndexFrom': 'findLastIndex',
  286. 'getOr': 'get',
  287. 'includesFrom': 'includes',
  288. 'indexOfFrom': 'indexOf',
  289. 'invokeArgs': 'invoke',
  290. 'invokeArgsMap': 'invokeMap',
  291. 'lastIndexOfFrom': 'lastIndexOf',
  292. 'padChars': 'pad',
  293. 'padCharsEnd': 'padEnd',
  294. 'padCharsStart': 'padStart',
  295. 'restFrom': 'rest',
  296. 'spreadFrom': 'spread',
  297. 'trimChars': 'trim',
  298. 'trimCharsEnd': 'trimEnd',
  299. 'trimCharsStart': 'trimStart'
  300. };
  301. /** Used to track methods that skip fixing their arity. */
  302. exports.skipFixed = {
  303. 'castArray': true,
  304. 'flow': true,
  305. 'flowRight': true,
  306. 'iteratee': true,
  307. 'mixin': true,
  308. 'runInContext': true
  309. };
  310. /** Used to track methods that skip rearranging arguments. */
  311. exports.skipRearg = {
  312. 'add': true,
  313. 'assign': true,
  314. 'assignIn': true,
  315. 'bind': true,
  316. 'bindKey': true,
  317. 'concat': true,
  318. 'difference': true,
  319. 'divide': true,
  320. 'eq': true,
  321. 'gt': true,
  322. 'gte': true,
  323. 'isEqual': true,
  324. 'lt': true,
  325. 'lte': true,
  326. 'matchesProperty': true,
  327. 'merge': true,
  328. 'multiply': true,
  329. 'overArgs': true,
  330. 'partial': true,
  331. 'partialRight': true,
  332. 'random': true,
  333. 'range': true,
  334. 'rangeRight': true,
  335. 'subtract': true,
  336. 'zip': true,
  337. 'zipObject': true
  338. };
  339. /***/ }
  340. /******/ ])
  341. });
  342. ;