{"name":"mem-fs","version":"4.1.4","author":{"name":"Simon Boudrias"},"license":"MIT","_id":"mem-fs@4.1.4","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":"4835fe66b98dbc5ae2a3bffd58dc2a974f8372f2","tarball":"http://registry-npm.ywwl.com/mem-fs/download/mem-fs-4.1.4.tgz","fileCount":4,"integrity":"sha512-NlRHmUiEcxDHI7FeDlrrTZP5YFvnoS74wEf5OrQ7NAg83B2Rv3oF+FWr961I0rVdxkKbZMjq2BcV7VFWGFPkog==","signatures":[{"sig":"MEQCIC0ntqVvrqxAddfmJR+z7EFyTUtWD9qUQCJGjWeJNcP2AiB0fiNBPLvryQwNSaziod91+0FRqsaUUgCFRHuNzMurMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9198,"size":2789,"noattachment":false,"key":"/mem-fs/-/mem-fs-4.1.4.tgz"},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"c7fd72015968466007698f9e9bedd71c38217496","scripts":{"test":"vitest run --coverage","prepare":"tsc","pretest":"eslint . && prettier --check --ignore-unknown --no-error-on-unmatched-pattern ."},"_npmUser":{"name":"mshima","email":"marceloshima@gmail.com"},"repository":{"url":"git+https://github.com/SBoudrias/mem-fs.git","type":"git"},"_npmVersion":"11.10.1","description":"Simple in-memory vinyl file store","directories":{},"_nodeVersion":"22.22.0","dependencies":{"vinyl":"^3.0.1","vinyl-file":"^5.0.0","@types/node":">=18","@types/vinyl":"^2.0.12"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.2","vitest":"^4.0.18","prettier":"^3.8.1","typescript":"5.9.3","eslint-config-xo":"^0.50.0","typescript-eslint":"^8.56.1","@vitest/coverage-v8":"^4.0.18","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/mem-fs_4.1.4_1772142890000_0.9075074898784623","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":1772142890144,"_cnpm_publish_time":1772142890144,"dist-tags":{"latest":"6.0.0"}}