All Projects → streamich → fs-monkey

streamich / fs-monkey

Licence: Unlicense license
Monkey-patches for file system related things

Programming Languages

javascript
184084 projects - #8 most used programming language

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].