{"name":"mem-fs","version":"4.1.5","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","_id":"mem-fs@4.1.5","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":"d242adc7ff75a28d4aa2a7186fcbeeaceaaefb7d","tarball":"http://registry-npm.ywwl.com/mem-fs/download/mem-fs-4.1.5.tgz","fileCount":4,"integrity":"sha512-6aWRo1jLo82ngo44tPQXjzINN7gvSNWhMU96I+O5nsJWdPi5vbUJWMTDGZDb/AVpCJRpaLGcFgrIBIpyk0DuUA==","signatures":[{"sig":"MEQCIGwjidar30VakxBTdG1eSiflWYMjAkl9IlddGD3pR0Q2AiBP8de5DWdfkCVdScAorgTMynKHUxfRF0TZWUO+FXYKoA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9309,"size":2836,"noattachment":false,"key":"/mem-fs/-/mem-fs-4.1.5.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":"ec9ff46f772aa9c393baa28d00f0d61c6c2f6033","scripts":{"tsc":"tsc"},"_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"repository":{"url":"git+https://github.com/SBoudrias/mem-fs.git","type":"git"},"_npmVersion":"lerna/5.2.2/node@v24.14.1+arm64 (darwin)","description":"Simple in-memory vinyl file store","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","dependencies":{"vinyl":"^3.0.1","vinyl-file":"^5.0.0"},"publishConfig":{"access":"public"},"_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_4.1.5_1783874293219_0.6765901666551422","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":1783874293357,"_cnpm_publish_time":1783874293357,"dist-tags":{"latest":"6.0.0"}}