I am writing a mongo script shell to manage data. I want to write it using modular code that uses function libraries as modules. In some cases, my own modules. In other cases, carefully selected node.js modules (which, as I know, will work in the Mongo shell environment, such as uuid).
Unfortunately, Mongo does not have real module control. load () is not the same thing. I am looking for something filled.
Does anyone know a library that can provide CommonJS module loading functionality that is common enough to work in the Mongo shell or ported to run in the Mongo shell?
Yes, I know, I could just do this in a clean node.js. But if there is such a thing as a real module loader that will work in the mongo shell, this would be my first choice.
source share