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