JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14312276
  • Score
    100M100P100Q219463F
  • License Unlicense

Monkey patches for file system related things.

Package Exports

  • fs-monkey
  • fs-monkey/lib/correctPath
  • fs-monkey/lib/correctPath.js
  • fs-monkey/lib/index.js
  • fs-monkey/lib/util/lists
  • fs-monkey/lib/util/lists.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fs-monkey) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.