{"name":"memfs","version":"4.36.2","keywords":["fs","filesystem","fs.js","memory-fs","memfs","file","file system","mount","memory","in-memory","virtual","test","testing","mock","fsa","file system access","native file system","webfs","crudfs","opfs","casfs","content addressable storage"],"author":{"url":"https://github.com/streamich","name":"streamich"},"license":"Apache-2.0","_id":"memfs@4.36.2","maintainers":[{"name":"streamich","email":"vadimsdaleckis@gmail.com"}],"homepage":"https://github.com/streamich/memfs","bugs":{"url":"https://github.com/streamich/memfs/issues"},"dist":{"shasum":"66086f47ce28a29925b927158ed8bba3e73efb5e","tarball":"http://registry-npm.ywwl.com/memfs/download/memfs-4.36.2.tgz","fileCount":316,"integrity":"sha512-UIXtxhe92sU20MiNVgL+1HBkjJKrUSO3PYjKooU1F9UohqIeMjf/dz2xNcBkmhAG4j4mZXTZ9DBzcyXk1eLwlA==","signatures":[{"sig":"MEUCIB/zq7kP4mGTicSYqPvjDRNGU5H009pbFk1rWjuWeqjdAiEAvqTBMuIKj0K+V71s+bgs3srxy4r4rMRvDCGG4Tm3qSg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":822255,"size":159920,"noattachment":false,"key":"/memfs/-/memfs-4.36.2.tgz"},"jest":{"testRegex":".*/__tests__/.*\\.(test|spec)\\.(jsx?|tsx?)$","transform":{"^.+\\.tsx?$":"ts-jest"},"testEnvironment":"node","moduleFileExtensions":["ts","tsx","js","jsx"]},"main":"lib/index.js","types":"lib/index.d.ts","config":{"commitizen":{"path":"git-cz"}},"engines":{"node":">= 4.0.0"},"funding":{"url":"https://github.com/sponsors/streamich","type":"github"},"gitHead":"be69cd1fdb1c2cb6828b1da43cade2a233c9933b","release":{"prepare":["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],"branches":["master",{"name":"next","prerelease":true}],"verifyConditions":["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},"scripts":{"test":"jest --maxWorkers 2","build":"tsc -p . && rimraf --glob lib/__tests__ 'lib/**/__tests__'","clean":"rimraf lib types typedocs gh-pages coverage","watch":"watch \"npm run build\" ./src","tslint":"tslint \"src/**/*.ts\" -t verbose","typedoc":"npx typedoc@0.25.13 --tsconfig tsconfig.json","coverage":"yarn test --collectCoverage","prettier":"prettier --write .","typecheck":"tsc -p .","demo:webfs":"webpack serve --config ./src/webfs/webpack.config.js","test:watch":"jest --watch","build:pages":"npx rimraf@5.0.5 gh-pages && mkdir -p gh-pages && cp -r typedocs/* gh-pages && cp -r coverage gh-pages/coverage","build:webfs":"NODE_ENV=production webpack --config ./src/webfs/webpack.config.js","demo:git-fsa":"webpack serve --config ./demo/git-fsa/webpack.config.js","demo:git-opfs":"webpack serve --config ./demo/git-opfs/webpack.config.js","test:coverage":"jest --coverage","prettier:check":"prettier --check .","demo:crud-and-cas":"webpack serve --config ./demo/crud-and-cas/webpack.config.js","demo:fsa-to-node-zipfile":"webpack serve --config ./demo/fsa-to-node-zipfile/webpack.config.js","demo:fsa-to-node-sync-tests":"webpack serve --config ./demo/fsa-to-node-sync-tests/webpack.config.js"},"_npmUser":{"name":"streamich","email":"vadimsdaleckis@gmail.com"},"prettier":{"semi":true,"useTabs":false,"tabWidth":2,"printWidth":120,"arrowParens":"avoid","singleQuote":true,"trailingComma":"all","bracketSpacing":true},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/streamich/memfs.git","type":"git"},"_npmVersion":"10.9.3","description":"In-memory file-system with Node's fs API.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"tslib":"^2.0.0","tree-dump":"^1.0.1","@jsonjoy.com/util":"^1.3.0","@jsonjoy.com/json-pack":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"url":"^0.11.1","jest":"^29.0.0","util":"^0.12.5","husky":"^8.0.1","assert":"^2.0.0","buffer":"^6.0.3","rimraf":"^5.0.0","tslint":"^6.1.3","process":"^0.11.10","ts-jest":"^29.1.0","ts-node":"^10.9.1","webpack":"^5.87.0","prettier":"^3.0.0","ts-loader":"^9.4.3","tar-stream":"^3.1.2","typescript":"^5.1.3","@types/jest":"^29.0.0","@types/mime":"^3.0.0","@types/node":"^10.17.60","webpack-cli":"^5.1.4","app-root-path":"^3.1.0","isomorphic-git":"^1.24.2","path-browserify":"^1.0.1","readable-stream":"^4.4.0","semantic-release":"^19.0.3","webpack-dev-server":"^4.15.1","html-webpack-plugin":"^5.5.3","tslint-config-common":"^1.6.2","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^9.0.1","@semantic-release/changelog":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/memfs_4.36.2_1755519439518_0.6886896937680138","host":"s3://npm-registry-packages-npm-production"},"readme":"# memfs\n\nIn-memory file system with Node.js `fs` API and browser File System (Access) API.\n\n[![npm][npm-badge]][npm-url]\n\n[npm-badge]: https://img.shields.io/npm/v/memfs.svg\n[npm-url]: https://www.npmjs.com/package/memfs\n\n## Overview\n\n`memfs` is a JavaScript library that implements an in-memory file system compatible with Node.js `fs` module and the browser File System (Access) API. Use it for testing, mocking file systems, or creating virtual file systems in both Node.js and browser environments.\n\n## Installation\n\n```bash\nnpm install memfs\n```\n\n## Quick Start\n\n### Node.js `fs` API\n\n```javascript\nimport { fs } from 'memfs';\n\n// Write a file\nfs.writeFileSync('/hello.txt', 'Hello, World!');\n\n// Read a file\nconst content = fs.readFileSync('/hello.txt', 'utf-8');\nconsole.log(content); // \"Hello, World!\"\n\n// Create a directory\nfs.mkdirSync('/mydir');\n\n// List directory contents\nconsole.log(fs.readdirSync('/')); // ['hello.txt', 'mydir']\n```\n\n### Browser File System API\n\n```javascript\nimport { fsa } from 'memfs';\n\n// Get root directory handle\nconst root = await fsa.getRoot();\n\n// Create a file\nconst file = await root.getFileHandle('hello.txt', { create: true });\nconst writable = await file.createWritable();\nawait writable.write('Hello, World!');\nawait writable.close();\n\n// Read the file\nconst readable = await file.getFile();\nconst text = await readable.text();\nconsole.log(text); // \"Hello, World!\"\n```\n\n## Features\n\n- Node.js `fs` module API compatibility\n- Browser File System (Access) API implementation\n- Adapters between `fs` and File System API\n- Directory snapshots and tree printing utilities\n- Works in Node.js and modern browsers\n- TypeScript support\n\n## Documentation\n\nFor detailed documentation and more examples, visit the [main project page](https://github.com/streamich/memfs).\n\n## License\n\nApache 2.0\n","publish_time":1755519439784,"_cnpm_publish_time":1755519439784,"dist-tags":{"latest":"4.80.1","next":"5.0.0-next.1"}}