{"name":"mem-fs","version":"4.1.3","author":{"name":"Simon Boudrias"},"license":"MIT","_id":"mem-fs@4.1.3","maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mshima","email":"marceloshima@gmail.com"}],"homepage":"https://github.com/SBoudrias/mem-fs#readme","bugs":{"url":"https://github.com/SBoudrias/mem-fs/issues"},"dist":{"shasum":"47e0320a9495a8d8fcbb8aa9eae121ee255e37be","tarball":"http://registry-npm.ywwl.com/mem-fs/download/mem-fs-4.1.3.tgz","fileCount":4,"integrity":"sha512-+2zSUVKcDWgcF90mPPwyH4J814uRI1PJcVt2RZ4/E8VggPEiIEL7ikMTlPR91P2ZySkyPgD0YGrccwo55SZvnw==","signatures":[{"sig":"MEYCIQCbBFte/3e+9fEci/FFuE4ppIuUSbcVKESU6HVzP35pEgIhAN6qbAC2sLrhDTAFr6OMYa2eZFhzC/mMuheyYRS7KboS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9311,"size":2842,"noattachment":false,"key":"/mem-fs/-/mem-fs-4.1.3.tgz"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"cbbd48ddcdd2ccfd3cf66dd64094e750657bf5d1","scripts":{"test":"vitest run --coverage","prepare":"tsc","pretest":"eslint . && prettier --check --ignore-unknown --no-error-on-unmatched-pattern ."},"_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/mem-fs.git","type":"git"},"_npmVersion":"11.6.2","description":"Simple in-memory vinyl file store","directories":{},"_nodeVersion":"25.2.1","dependencies":{"vinyl":"^3.0.0","vinyl-file":"^5.0.0","@types/node":">=18","@types/vinyl":"^2.0.12"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.2","vitest":"^4.0.16","prettier":"^3.0.3","typescript":"^5.2.2","eslint-config-xo":"^0.49.0","typescript-eslint":"^8.32.1","@vitest/coverage-v8":"^4.0.16","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/mem-fs_4.1.3_1768073496839_0.3096342648145993","host":"s3://npm-registry-packages-npm-production"},"readme":"# mem-fs\n\nSimple in-memory vinyl file store.\n\n## Usage\n\n### Loading a file\n\nYou access a file using `store#get()` method. If the file is in memory, it will be used. Otherwise, we'll load the file from the file-system.\n\n```js\nimport { create } from 'mem-fs';\n\nconst store = create();\nstore.get('/test/file.txt');\n```\n\nWhen trying to load a file we cannot read from disk, an empty Vinyl file will be returned. The `contents` of this file will be set to `null`.\n\nTrying to get a directory or any invalid files will also return an empty Vinyl file pointer.\n\n### Adding/updating a file\n\nYou update file references by using `store#add()` method. This method take a `vinyl` file object as parameter.\n\n```js\nimport File from 'vinyl';\nimport { create } from 'mem-fs';\n\nconst coffeeFile = new File({\n  cwd: '/',\n  base: '/test/',\n  path: '/test/file.coffee',\n  contents: new Buffer('test = 123'),\n});\n\nconst store = create();\nstore.add(coffeeFile);\n```\n\n### Iterating over the file system\n\nUsing `store#each(cb(file, index))`, you can iterate over every file stored in the file system.\n\n### Get all files\n\nUsing `store#all()`, you can get every file stored in the file system.\n\n### Check existence in the file system\n\nUsing `store#existsInMemory()`, you can check if the file already exists in the file system without loading it from disk.\n\n### Stream every file stored in the file system\n\nUsing `store#stream()`, you can create a stream with every file stored in the file system.\n\n### Pass stored files through a pipeline\n\n`store#pipeline()` generates a new map with yielded files in transforms.\nIf no transform is passed, files references are updated.\n","publish_time":1768073496995,"_cnpm_publish_time":1768073496995,"dist-tags":{"latest":"6.0.0"}}