Socket
Socket
Sign inDemoInstall

fs-monkey

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-monkey - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "fs-monkey",
"version": "0.1.2",
"version": "0.1.3",
"description": "Monkey patches for file system related things.",

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

# `fs-monkey`
Monkey-patches for filesystem related things.
[![][npm-img]][npm-url]
Monkey-patches for filesystem related things. Rewrite `require` function,
load Node's modules from memory. Or rewrite the whole `fs` filesystem module.
**Terms**

@@ -22,6 +23,6 @@

**API**
`fs-monkey` **API**
- [`patchFs(vol[, fs])`](#patchfsvol-fs) - rewrites Node's filesystem module `fs` with *fs-like* object `vol`
- [`patchRequire(vol[, Module])`](#patchrequirevol-module) - patches Node's `module` module to use a give *fs-like* object `vol` for module loading
- [`patchRequire(vol[, Module])`](#patchrequirevol-module) - rewrites `require` function, patches Node's `module` module to use a give *fs-like* object `vol` for module loading

@@ -74,7 +75,7 @@

```js
patchRequire({
let vol = {
readFileSync: () => {},
realpathSync: () => {},
statSync: () => {},
});
};
```

@@ -81,0 +82,0 @@

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