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'),
|
var mapping = require('./_mapping'),
|
||||||
mutateMap = mapping.mutate,
|
mutateMap = mapping.mutate,
|
||||||
fallbackHolder = {};
|
fallbackHolder = require('./placeholder');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `convert` which accepts a `util` object of methods
|
* 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) {
|
_.each([mapping.aliasToReal, mapping.remap], function(data) {
|
||||||
_.forOwn(data, function(realName, alias) {
|
_.forOwn(data, function(realName, alias) {
|
||||||
var modulePath = path.join(target, alias + '.js');
|
var modulePath = path.join(target, alias + '.js');
|
||||||
if (!_.startsWith(alias, '_') &&
|
if (!_.includes(modulePaths, modulePath)) {
|
||||||
!_.includes(modulePaths, modulePath)) {
|
|
||||||
modulePaths.push(modulePath);
|
modulePaths.push(modulePath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
var convert = require('./convert');
|
var convert = require('./convert'),
|
||||||
module.exports = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
|
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
|
||||||
|
|
||||||
|
func.placeholder = require('./placeholder');
|
||||||
|
module.exports = func;
|
||||||
|
|||||||
Reference in New Issue
Block a user