• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

lodash-amd-import

Automatically imports used lodash modules in your code.
mokkabonna
0.3.0 255
0
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

lodash-amd-import package

Automatically imports used lodash modules in your code.

Meant to be used together with https://github.com/mokkabonna/lodash-requirejs-loader-plugin

Just use _.map _.flatten _.sortBy etc from lodash as you normally do, press alt-l alt-i and a import string of _!flatten,map,sortBy will be genereated and replace the existing _!... import string you have.

Go from

define([
  '_!map'
], function(_) {
 
  var uniqueSquares = _.map(_.uniq(_.flatten([9, [2, 7], 7, 2, 2])), function(num) {
    return num * 2;
  });
});

to:

define([
  '_!flatten,map,uniq'
], function(_) {
 
  var uniqueSquares = _.map(_.uniq(_.flatten([9, [2, 7], 7, 2, 2])), function(num) {
    return num * 2;
  });
});

just with a keystroke.

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by