{"name":"mem-fs","version":"5.0.0","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","_id":"mem-fs@5.0.0","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":"e393ee8e67a163fd9af5c8b906018bac32595a5c","tarball":"http://registry-npm.ywwl.com/mem-fs/download/mem-fs-5.0.0.tgz","fileCount":4,"integrity":"sha512-JSgxzLrynFUM1RHQbTDBffq+irRR/tPpZrfkqurOtUOqkk7pXgu7H9SV82al3kLh5uprQh/3pU7U7ScEtIKtvg==","signatures":[{"sig":"MEYCIQCU5O6F+Gxn7WqBjR8ZBt39krCbMV5+oq1ofSX+T0gMxAIhAOV5Z3tVGqMByh841QfiEYADw++cS+jzNiocVCvfSX8L","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mem-fs@5.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11341,"size":3221,"noattachment":false,"key":"/mem-fs/-/mem-fs-5.0.0.tgz"},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"84a29f24c942584bfbb257a845d6161d5ab65b51","scripts":{"tsc":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"sboudrias","email":"admin@simonboudrias.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:053d6935-2b41-487a-8d4f-73d2ff186cfb"}},"repository":{"url":"git+https://github.com/SBoudrias/mem-fs.git","type":"git"},"_npmVersion":"11.17.0","description":"Simple in-memory vinyl file store","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"vinyl":"^3.0.1","vinyl-file":"^5.0.0"},"publishConfig":{"main":"./dist/index.js","types":"./dist/index.d.ts","access":"public","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"}},"_hasShrinkwrap":false,"peerDependencies":{"@types/node":">=18","@types/vinyl":"^2.0.12"},"peerDependenciesMeta":{"@types/node":{"optional":true},"@types/vinyl":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/mem-fs_5.0.0_1786896515440_0.4778562905600605","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":1786896515542,"_cnpm_publish_time":1786896515542,"dist-tags":{"latest":"6.0.0"}}