babel-plugin-lodash-modularize
Version:
Babel plugin that replaces lodash library import statement to individual module imports.
23 lines (15 loc) • 715 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _methodMap = require('./methodMap');
var _methodMap2 = _interopRequireDefault(_methodMap);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (methodName) {
if (!_methodMap2.default[methodName]) {
throw new Error('lodash method "' + methodName + '" does not exist. If you think it is an error, report it at https://github.com/gajus/babel-plugin-lodash-modularize/issues/1.');
}
return 'lodash/' + _methodMap2.default[methodName] + '/' + methodName;
};
module.exports = exports['default'];
//# sourceMappingURL=resolveMethod.js.map