mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add fp/placeholder module.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var mapping = require('./_mapping'),
|
||||
mutateMap = mapping.mutate,
|
||||
fallbackHolder = {};
|
||||
fallbackHolder = require('./placeholder');
|
||||
|
||||
/**
|
||||
* The base implementation of `convert` which accepts a `util` object of methods
|
||||
|
||||
6
fp/placeholder.js
Normal file
6
fp/placeholder.js
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* The default argument placeholder value for methods.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {};
|
||||
@@ -97,8 +97,7 @@ function build(target) {
|
||||
_.each([mapping.aliasToReal, mapping.remap], function(data) {
|
||||
_.forOwn(data, function(realName, alias) {
|
||||
var modulePath = path.join(target, alias + '.js');
|
||||
if (!_.startsWith(alias, '_') &&
|
||||
!_.includes(modulePaths, modulePath)) {
|
||||
if (!_.includes(modulePaths, modulePath)) {
|
||||
modulePaths.push(modulePath);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
var convert = require('./convert');
|
||||
module.exports = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
|
||||
var convert = require('./convert'),
|
||||
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
|
||||
Reference in New Issue
Block a user