TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

Some minor JS refactorings #129

Closed pvdb closed 9 years ago

pvdb commented 9 years ago

Hey @TylerBrock,

This PR doesn't actually change any of the mongo-hacker functionality, but rather consists of some JS refactorings that allowed me to DRY up the show collections and count documents code a bit, by extracting some shared code into a function, as alluded to in #128

The overall diff may be a bit harder to grok than the individual commits, which I've tried to keep as small as possible, to make reviewing this PR a tad easier... lemme know your thoughts!

Thanks,

@pvdb

TylerBrock commented 9 years ago

Great, thanks!