Built motion from commit 1038d87.|0.0.141
[motion.git] / public / bower_components / lodash / fp / _mapping.js
1 /** Used to map aliases to their real names. */
2 exports.aliasToReal = {
3   '__': 'placeholder',
4   'all': 'some',
5   'allPass': 'overEvery',
6   'apply': 'spread',
7   'assoc': 'set',
8   'assocPath': 'set',
9   'compose': 'flowRight',
10   'contains': 'includes',
11   'dissoc': 'unset',
12   'dissocPath': 'unset',
13   'each': 'forEach',
14   'eachRight': 'forEachRight',
15   'equals': 'isEqual',
16   'extend': 'assignIn',
17   'extendWith': 'assignInWith',
18   'first': 'head',
19   'init': 'initial',
20   'mapObj': 'mapValues',
21   'omitAll': 'omit',
22   'nAry': 'ary',
23   'path': 'get',
24   'pathEq': 'matchesProperty',
25   'pathOr': 'getOr',
26   'pickAll': 'pick',
27   'pipe': 'flow',
28   'prop': 'get',
29   'propOf': 'propertyOf',
30   'propOr': 'getOr',
31   'somePass': 'overSome',
32   'unapply': 'rest',
33   'unnest': 'flatten',
34   'useWith': 'overArgs',
35   'whereEq': 'filter',
36   'zipObj': 'zipObject'
37 };
38
39 /** Used to map ary to method names. */
40 exports.aryMethod = {
41   '1': [
42     'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
43     'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin',
44     'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext',
45     'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words'
46   ],
47   '2': [
48     'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindKey',
49     'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
50     'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
51     'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every',
52     'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
53     'findLastKey', 'flatMap', 'flattenDepth', 'forEach', 'forEachRight', 'forIn',
54     'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has',
55     'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap',
56     'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map',
57     'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit',
58     'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
59     'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
60     'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
61     'repeat', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
62     'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
63     'split', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile',
64     'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd',
65     'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset',
66     'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'
67   ],
68   '3': [
69     'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
70     'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith',
71     'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'reduce', 'reduceRight',
72     'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform',
73     'unionBy', 'unionWith', 'xorBy', 'xorWith', 'zipWith'
74   ],
75   '4': [
76     'fill', 'setWith'
77   ]
78 };
79
80 /** Used to map ary to rearg configs. */
81 exports.aryRearg = {
82   '2': [1, 0],
83   '3': [2, 0, 1],
84   '4': [3, 2, 0, 1]
85 };
86
87 /** Used to map method names to their iteratee ary. */
88 exports.iterateeAry = {
89   'assignWith': 2,
90   'assignInWith': 2,
91   'cloneDeepWith': 1,
92   'cloneWith': 1,
93   'dropRightWhile': 1,
94   'dropWhile': 1,
95   'every': 1,
96   'filter': 1,
97   'find': 1,
98   'findIndex': 1,
99   'findKey': 1,
100   'findLast': 1,
101   'findLastIndex': 1,
102   'findLastKey': 1,
103   'flatMap': 1,
104   'forEach': 1,
105   'forEachRight': 1,
106   'forIn': 1,
107   'forInRight': 1,
108   'forOwn': 1,
109   'forOwnRight': 1,
110   'isEqualWith': 2,
111   'isMatchWith': 2,
112   'map': 1,
113   'mapKeys': 1,
114   'mapValues': 1,
115   'partition': 1,
116   'reduce': 2,
117   'reduceRight': 2,
118   'reject': 1,
119   'remove': 1,
120   'some': 1,
121   'takeRightWhile': 1,
122   'takeWhile': 1,
123   'times': 1,
124   'transform': 2
125 };
126
127 /** Used to map method names to iteratee rearg configs. */
128 exports.iterateeRearg = {
129   'mapKeys': [1]
130 };
131
132 /** Used to map method names to rearg configs. */
133 exports.methodRearg = {
134   'assignInWith': [1, 2, 0],
135   'assignWith': [1, 2, 0],
136   'getOr': [2, 1, 0],
137   'isMatchWith': [2, 1, 0],
138   'mergeWith': [1, 2, 0],
139   'pullAllBy': [2, 1, 0],
140   'setWith': [3, 1, 2, 0],
141   'sortedIndexBy': [2, 1, 0],
142   'sortedLastIndexBy': [2, 1, 0],
143   'zipWith': [1, 2, 0]
144 };
145
146 /** Used to map method names to spread configs. */
147 exports.methodSpread = {
148   'partial': 1,
149   'partialRight': 1
150 };
151
152 /** Used to identify methods which mutate arrays or objects. */
153 exports.mutate = {
154   'array': {
155     'fill': true,
156     'pull': true,
157     'pullAll': true,
158     'pullAllBy': true,
159     'pullAt': true,
160     'remove': true,
161     'reverse': true
162   },
163   'object': {
164     'assign': true,
165     'assignIn': true,
166     'assignInWith': true,
167     'assignWith': true,
168     'defaults': true,
169     'defaultsDeep': true,
170     'merge': true,
171     'mergeWith': true
172   },
173   'set': {
174     'set': true,
175     'setWith': true,
176     'unset': true
177   }
178 };
179
180 /** Used to track methods with placeholder support */
181 exports.placeholder = {
182   'bind': true,
183   'bindKey': true,
184   'curry': true,
185   'curryRight': true,
186   'partial': true,
187   'partialRight': true
188 };
189
190 /** Used to map real names to their aliases. */
191 exports.realToAlias = (function() {
192   var hasOwnProperty = Object.prototype.hasOwnProperty,
193       object = exports.aliasToReal,
194       result = {};
195
196   for (var key in object) {
197     var value = object[key];
198     if (hasOwnProperty.call(result, value)) {
199       result[value].push(key);
200     } else {
201       result[value] = [key];
202     }
203   }
204   return result;
205 }());
206
207 /** Used to map method names to other names. */
208 exports.remap = {
209   'curryN': 'curry',
210   'curryRightN': 'curryRight',
211   'getOr': 'get',
212   'trimChars': 'trim',
213   'trimCharsEnd': 'trimEnd',
214   'trimCharsStart': 'trimStart'
215 };
216
217 /** Used to track methods that skip `_.rearg`. */
218 exports.skipRearg = {
219   'add': true,
220   'assign': true,
221   'assignIn': true,
222   'concat': true,
223   'difference': true,
224   'gt': true,
225   'gte': true,
226   'lt': true,
227   'lte': true,
228   'matchesProperty': true,
229   'merge': true,
230   'partial': true,
231   'partialRight': true,
232   'random': true,
233   'range': true,
234   'rangeRight': true,
235   'subtract': true,
236   'zip': true,
237   'zipObject': true
238 };