Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
/ fs-monkey Public archive
forked from streamich/fs-monkey

Monkey-patches for file system related things

License

Notifications You must be signed in to change notification settings

dylan-kitn/fs-monkey

 
 

Repository files navigation

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.

About

Monkey-patches for file system related things

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%