{"_id":"mem-fs@6.0.0","bugs":{"url":"https://github.com/SBoudrias/mem-fs/issues"},"dist":{"shasum":"40719ed8f000970b908388251330f636df3886f6","tarball":"http://registry-npm.ywwl.com/mem-fs/download/mem-fs-6.0.0.tgz","integrity":"sha512-sj1/T9x/ypgRQQk4NDhA9QTtBr2woET2ayxkvCLoDPQXQ3DPkbeC+kQj7SiP8kn6Hi9ld8lVBCSj/KtZswP3jg==","fileCount":4,"unpackedSize":9379,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mem-fs@6.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHkKi/iyNCiQXCtTfxKq/9pnegnh36rfVG6cfqqW2QtGAiEApCRr3KLJJX8fmFjmtYBfwR04FHRQJjuyLA8tPQqHmP8="}],"size":2944,"noattachment":false,"key":"/mem-fs/-/mem-fs-6.0.0.tgz"},"main":"./dist/index.js","name":"mem-fs","type":"module","types":"./dist/index.d.ts","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"f47dad3b915d9e0e62b29551b2098c9dbf2e5f4b","license":"MIT","scripts":{"tsc":"tsc"},"version":"6.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:053d6935-2b41-487a-8d4f-73d2ff186cfb"},"approver":{"name":"sboudrias","email":"admin@simonboudrias.com"}},"homepage":"https://github.com/SBoudrias/mem-fs#readme","repository":{"url":"git+https://github.com/SBoudrias/mem-fs.git","type":"git"},"_npmVersion":"lerna/5.6.0/node@v24.19.0+x64 (linux)","description":"Simple in-memory vinyl file store","directories":{},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"mshima","email":"marceloshima@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"vinyl":"^3.0.1","vinyl-file":"^5.0.0"},"publishConfig":{"access":"public"},"peerDependencies":{"@types/node":">=18","@types/vinyl":"^2.0.12"},"peerDependenciesMeta":{"@types/node":{"optional":true},"@types/vinyl":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mem-fs_6.0.0_1787605839974_0.014615084300295678"},"_hasShrinkwrap":false,"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":1787605840053,"_cnpm_publish_time":1787605840053,"dist-tags":{"latest":"6.0.0"}}