Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider splitting the package out across multiple packages / modules

See original GitHub issue

Both async and underscore currently suffer from being a “kitchensink” of anything possibly uesful, these modules didn’t start out that way but more and more stuff was added to it.

Projects like lodash or underbar have mitigated against this effect by splitting the module out across multiple modules / packages. @jdalton & @Matt-Esch have done good work to allow usage of the functionality piece by piece.

This allows consumers of the module to use a tighter subset of the functionality.

@gozala also had a similar approach with splitting out reducers and reducible and then a set of optional functions all over npm like buffer-reduce , tree-reduce , dom-reduce and others.

There probably is still value in having a module that combines everything together in a “kitchensink” for people that prefer that just like lodash allows you to get it all or get the functions one by one.

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

DamonOehlmancommented, Feb 27, 2014

Taking a look at underbar I’d definitely 👍 going with that approach over others.

Personally, I love being able to communicate to someone “Hey, you should go try highland.js” and also this involves is them having to:

a. look at the highland.js project page / website b. start using it in their projects (be it node or something browserified) by simpling installing one package (npm install highland --save)

Then using the intelligence of browserify’s static analysis to only bring in the functionality that is required based on what I have used is fantastic. I agree that the work done with lodash is an improvement on the kitchen sink approach, but my personal opinion is that using that approach creates a lot of module pollution. While I’m sure npm can handle all those separate modules, I’m not sure that it’s efficient way for us to communicate as humans. Just my 2c - but it’s 2c I’m pretty passionate about…

Majiircommented, Sep 27, 2015


I wanted to use batchWithTimeOrCount today, but I was surprised to see that I would have to include the entire library in my Browserify bundle.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
Splitting a package across multiple individual .go files in the same directory (same package) should not cause a problem in and of itself, ......
Read more >
split into multiple projects/packages? #113 - GitHub
I mean yes splitting them out into multiple packages and modules is a good idea if you have a decent package manager.
Read more >
When do you split your project into multiple packages? : r/golang
16 votes, 17 comments. Most online tutorials I see people split there projects into separate packages having main in addition to others.
Read more >
RFC: Splitting the library into packages - Discuss - ProseMirror
Specifically, I am debating to create one package per 'thing you'd import', rather than distributing, as I am now, a big module from...
Read more >
Python Modules and Packages – An Introduction
This article explores Python modules and Python packages, two mechanisms that ... to a module without having any knowledge of the application outside...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found