Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

fs-monkey

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

fs-monkey

Monkey patches for file system related things.

    1.0.5latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
13,168,471
decreased by-1.91%

Weekly downloads

Changelog

Source

1.0.5 (2023-09-25)

Bug Fixes

  • look for exports.require in package.json in addition to main when patching require (#378) (411b791)

Readme

Source

fs-monkey

Monkey-patches for filesystem related things.

  • Rewrite require function to load Node's modules from memory.
  • Or rewrite the whole fs filesystem module.

Install

npm install --save fs-monkey

Terms

An fs-like object is an object that implements methods of Node's filesystem API. It is denoted as vol:

let vol = {
    readFile: () => { /* ... */ },
    readFileSync: () => { /* ... */ },
    // etc...
}

Reference

  • patchFs - rewrites Node's filesystem module fs with fs-like object vol
  • patchRequire - rewrites require function, patches Node's module module to use a given fs-like object for module loading

License

Unlicense - public domain.

Keywords

FAQs

Last updated on 25 Sep 2023

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc