927854894b | ||
---|---|---|
.. | ||
docs/api | ||
lib | ||
src | ||
.babelrc | ||
.nvmrc | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
index.js | ||
package.json | ||
renovate.json | ||
yarn.lock |
README.md
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 modulefs
with fs-like objectvol
patchRequire
- rewritesrequire
function, patches Node'smodule
module to use the give fs-like objectvol
for module loading
License
Unlicense - public domain.