Add back fp build-modules files.

This commit is contained in:
John-David Dalton
2016-01-25 00:16:23 -08:00
parent 258ad020ed
commit c49ace5587
12 changed files with 172 additions and 43 deletions

View File

@@ -215,7 +215,7 @@ function baseConvert(util, name, func) {
// Wrap the lodash method and its aliases.
each(keys(_), function(key) {
each(mapping.alias[key] || [], function(alias) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
});
});

View File

@@ -1,36 +1,5 @@
module.exports = {
/** Used to map method names to their aliases. */
'alias': {
'ary': ['nAry'],
'assignIn': ['extend'],
'assignInWith': ['extendWith'],
'filter': ['whereEq'],
'flatten': ['unnest'],
'flow': ['pipe'],
'flowRight': ['compose'],
'forEach': ['each'],
'forEachRight': ['eachRight'],
'get': ['path', 'prop'],
'getOr': ['pathOr', 'propOr'],
'head': ['first'],
'includes': ['contains'],
'initial': ['init'],
'isEqual': ['equals'],
'mapValues': ['mapObj'],
'matchesProperty': ['pathEq'],
'omit': ['dissoc', 'omitAll'],
'overArgs': ['useWith'],
'overEvery': ['allPass'],
'overSome': ['somePass'],
'pick': ['pickAll'],
'propertyOf': ['propOf'],
'rest': ['unapply'],
'some': ['all'],
'spread': ['apply'],
'zipObject': ['zipObj']
},
/** Used to map method names to their iteratee ary. */
'aryIteratee': {
'assignWith': 2,
@@ -183,6 +152,37 @@ module.exports = {
'partialRight': true
},
/** Used to map real names to their aliases. */
'realToAlias': {
'ary': ['nAry'],
'assignIn': ['extend'],
'assignInWith': ['extendWith'],
'filter': ['whereEq'],
'flatten': ['unnest'],
'flow': ['pipe'],
'flowRight': ['compose'],
'forEach': ['each'],
'forEachRight': ['eachRight'],
'get': ['path', 'prop'],
'getOr': ['pathOr', 'propOr'],
'head': ['first'],
'includes': ['contains'],
'initial': ['init'],
'isEqual': ['equals'],
'mapValues': ['mapObj'],
'matchesProperty': ['pathEq'],
'omit': ['dissoc', 'omitAll'],
'overArgs': ['useWith'],
'overEvery': ['allPass'],
'overSome': ['somePass'],
'pick': ['pickAll'],
'propertyOf': ['propOf'],
'rest': ['unapply'],
'some': ['all'],
'spread': ['apply'],
'zipObject': ['zipObj']
},
/** Used to track methods that skip `_.rearg`. */
'skipRearg': {
'assign': true,