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