{"name":"@jsonjoy.com/fs-node","version":"4.56.1","keywords":["fs","filesystem","node","virtual","memory","in-memory","memfs"],"author":{"url":"https://github.com/streamich","name":"streamich"},"license":"Apache-2.0","_id":"@jsonjoy.com/fs-node@4.56.1","maintainers":[{"name":"json-joy-team","email":"team@jsonjoy.com"},{"name":"streamich","email":"vadimsdaleckis@gmail.com"}],"homepage":"https://github.com/streamich/memfs/tree/master/packages/fs-node","dist":{"shasum":"7fd744b16ab5f1ab0ae6ff88b7db9ddea9228e3e","tarball":"http://registry-npm.ywwl.com/@jsonjoy.com/fs-node/download/@jsonjoy.com/fs-node-4.56.1.tgz","fileCount":54,"integrity":"sha512-0CQrk4I4+lFQBwShHV2cEimibc7cdim8CPztjG6Ay8JUDJ3bddMEhOLp0X2CJIEPJbx9+bxMExx9rhEyoPzVEg==","signatures":[{"sig":"MEUCIQDRpCiFBmsG4IpyCJ6Zk4sHwYbTc/c9pa5m6cyPCWnEJgIgbAliDfIdTAcEJgG1D7mdVuGDp6P4X5q7i1epNMsj+cM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":286895,"size":57565,"noattachment":false,"key":"/@jsonjoy.com/fs-node/-/@jsonjoy.com/fs-node-4.56.1.tgz"},"jest":{"preset":"ts-jest","rootDir":".","testRegex":".*/(__tests__|__jest__|demo)/.*\\.(test|spec)\\.tsx?$","transform":{"^.+\\.tsx?$":"ts-jest"},"testEnvironment":"node","moduleFileExtensions":["ts","js","tsx"],"testPathIgnorePatterns":["node_modules"],"transformIgnorePatterns":[".*/node_modules/.*"]},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=10.0"},"funding":{"url":"https://github.com/sponsors/streamich","type":"github"},"gitHead":"c68fdb03287e18fb8de1b2945bfc8e0ce909926d","scripts":{"jest":"node -r ts-node/register ./node_modules/.bin/jest","test":"jest --maxWorkers 7","build":"tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib","clean":"rimraf lib typedocs coverage gh-pages yarn-error.log","test:ci":"yarn jest --maxWorkers 3 --no-cache","typedoc":"typedoc","coverage":"yarn test --collectCoverage","typecheck":"tsc -p ."},"typings":"lib/index.d.ts","_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"repository":"streamich/memfs","description":"In-memory filesystem with Node.js fs-compatible API","directories":{},"dependencies":{"thingies":"^2.5.0","glob-to-regex.js":"^1.0.0","@jsonjoy.com/fs-core":"4.56.1","@jsonjoy.com/fs-print":"4.56.1","@jsonjoy.com/fs-node-utils":"4.56.1","@jsonjoy.com/fs-node-builtins":"4.56.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.2","ts-node":"^10.9.2","typescript":"^5.9.2","@types/jest":"^29.0.0","@types/node":"^20.0.0"},"peerDependencies":{"tslib":"2"},"_npmOperationalInternal":{"tmp":"tmp/fs-node_4.56.1_1768845599889_0.9590367514366624","host":"s3://npm-registry-packages-npm-production"},"readme":"# @jsonjoy.com/fs-node\n\nIn-memory filesystem with Node.js `fs`-compatible API.\n\n## Installation\n\n```bash\nnpm install @jsonjoy.com/fs-node\n```\n\n## Usage\n\n```ts\nimport { Volume } from '@jsonjoy.com/fs-node';\n\nconst vol = new Volume();\nvol.writeFileSync('/hello.txt', 'Hello, World!');\nconsole.log(vol.readFileSync('/hello.txt', 'utf8')); // Hello, World!\n```\n\n### Create filesystem from JSON\n\n```ts\nimport { Volume } from '@jsonjoy.com/fs-node';\n\nconst vol = Volume.fromJSON({\n  '/app/index.js': 'console.log(\"Hello\");',\n  '/app/package.json': '{\"name\": \"app\"}',\n});\n\nconsole.log(vol.readdirSync('/app')); // ['index.js', 'package.json']\n```\n\n## API\n\nThe `Volume` class implements Node.js `fs` module's synchronous and callback APIs:\n\n- `readFile`, `readFileSync`\n- `writeFile`, `writeFileSync`\n- `mkdir`, `mkdirSync`\n- `readdir`, `readdirSync`\n- `stat`, `statSync`\n- `unlink`, `unlinkSync`\n- ... and many more\n\nIt also exposes a `promises` property for the Promise-based API:\n\n```ts\nconst data = await vol.promises.readFile('/hello.txt', 'utf8');\n```\n\n## License\n\nApache-2.0\n","publish_time":1768845600052,"_cnpm_publish_time":1768845600052,"dist-tags":{"latest":"4.80.1"}}