XuelesszzZ 94af2b8e7b 6-30-5 | 1 жил өмнө | |
---|---|---|
.. | ||
docs | 1 жил өмнө | |
lib | 1 жил өмнө | |
CHANGELOG.md | 1 жил өмнө | |
LICENSE | 1 жил өмнө | |
README.md | 1 жил өмнө | |
package.json | 1 жил өмнө |
Monkey-patches for filesystem related things.
require
function to load Node's modules from memory.fs
filesystem module.npm install --save fs-monkey
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...
}
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 loadingUnlicense - public domain.