meteorhacks / npm

Complete NPM integration for Meteor
http://meteorhacks.com/complete-npm-integration-for-meteor.html
MIT License
509 stars 43 forks source link

Load individual functions or packages from a library #43

Closed chhib closed 10 years ago

chhib commented 10 years ago

It would be great to be able to only require individual functions or packages. Today I can:

var mout = Meteor.npmRequire('mout');

Which is great. But even greater would be to only access what I want:

var map = Meteor.npmRequire('mout/array/map');
arunoda commented 10 years ago

You can require individual files from a npm module

On Sunday, August 31, 2014, David Andersson notifications@github.com wrote:

It would be great to be able to only require individual functions or packages. Today I can:

var mout = Meteor.npmRequire('mout');

Which is great. But even greater would be to only access what I want:

var map = Meteor.npmRequire('mout/array/map');

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/npm/issues/43.


Arunoda Susiripala I curate Meteor Weekly - Check it out! http://meteorhacks.com/meteor-weekly/?utm_source=email-footer&utm_medium=email&utm_campaign=meteorweekly

chhib commented 10 years ago

Thank you. This worked:

var map = Meteor.npmRequire('mout/array/map.js');