New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

require-inject

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-inject - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

README.md~

2

package.json
{
"name": "require-inject",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple mock injector compatible needing no instrumentation in the libraries being tested",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,13 +23,13 @@ require-inject

* *`var mymod = requireInject( module, mocks )`*
* **`var mymod = requireInject( module, mocks )`**
**module** is the name of the module you want to require.
*module* is the name of the module you want to require.
**mocks** is an object with keys that are the names of the modules you want
**to mock and values of the mock version of the objects.
*mocks* is an object with keys that are the names of the modules you want
*to mock and values of the mock version of the objects.
*requireInject* makes it so that when **module** is required, any of its
calls to require for modules inclued in **mocks** will return the mocked
version. It takes care to not impact any other uses of **module**, any
**requireInject** makes it so that when *module* is required, any of its
calls to require for modules inclued in *mocks* will return the mocked
version. It takes care to not impact any other uses of *module*, any
calls to require for it will get a version without mocks.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc