fs-monkey

Monkey patches for file system related things.

Stats

StarsIssuesVersionUpdatedCreatedSize
fs-monkey
76181.0.310 months ago4 years agoMinified + gzip package size for fs-monkey in KB

Readme

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.