DEV Community

Discussion on: Generate All Possible Combinations in JavaScript Using Combinate

Collapse
 
farzadbagheri profile image
farzadbagheri

Problem cases like this make me think, how often should I resort to a module and how often should I just write a function myself? Cool example though

Collapse
 
nas5w profile image
Nick Scialli (he/him) • Edited

Yeah, you’re absolutely right. It’s just something that I’ve written so often for different projects I figured I’d wrap it up as an npm package. There’s some level or DRYness to able to just import something like this rather than rolling the function for each project.