Node-sandboxed-module: Simplify Dependency Injection and Unit Testing in Node.js
Summary of my bookmarked Github repositories from Oct 25th, 2019
Github repositories
- felixge/node-sandboxed-module
Sandboxed-module is a node.js module loader that facilitates dependency injection in modules. It allows you to inject dependencies, globals, and locals into your modules, making it particularly useful for unit testing. The module creates a new v8 context for each loaded module while still providing access to the standard node.js environment. It offers functions like SandboxedModule.load(), SandboxedModule.require(), and SandboxedModule.configure() to customize the injection process. Sandboxed-module also supports source transformers for code transformation. It can be installed via npm and is licensed under the MIT license.