{"_id":"@cjser/mem-fs__v4_1_5","name":"@cjser/mem-fs__v4_1_5","dist-tags":{"latest":"4.1.5-cjser.2"},"versions":{"4.1.5-cjser.2":{"name":"@cjser/mem-fs__v4_1_5","version":"4.1.5-cjser.2","description":"Simple in-memory vinyl file store","license":"MIT","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"type":"module","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist-cjser/index.cjs","default":"./dist/index.js"},"./package.json":"./package.json"},"publishConfig":{"access":"public"},"scripts":{"tsc":"tsc"},"dependencies":{"vinyl":"^3.0.1","@cjser/vinyl-file":"5.0.0-cjser.2"},"peerDependencies":{"@types/node":">=18","@types/vinyl":"^2.0.12"},"peerDependenciesMeta":{"@types/node":{"optional":true},"@types/vinyl":{"optional":true}},"engines":{"node":">=18.0.0"},"main":"./dist-cjser/index.cjs","types":"./dist/index.d.ts","gitHead":"ec9ff46f772aa9c393baa28d00f0d61c6c2f6033","cjser":{"sourceVersion":"4.1.5","cjserVersion":2,"original":{"name":"mem-fs","version":"4.1.5","main":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"repository":{"type":"git","url":"https://github.com/SBoudrias/mem-fs.git"},"dependencies":{"vinyl":"^3.0.1","vinyl-file":"^5.0.0"},"files":["dist/"],"scripts":{"tsc":"tsc"}}},"_id":"@cjser/mem-fs__v4_1_5@4.1.5-cjser.2","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-9LsgLQyLfPKYo8IEJFT7zMESUpz4Ck0UqT7rJTAChCRviVMeO9fRMBYrU58bwU7jo6IagwnIJf/GdIev63D/GQ==","shasum":"34741332e384d2772e66e2f495cf72735f9e7024","tarball":"https://registry.npmjs.org/@cjser/mem-fs__v4_1_5/-/mem-fs__v4_1_5-4.1.5-cjser.2.tgz","fileCount":5,"unpackedSize":16715,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDLxyNAWQ2a7TsnywF9Zm7vbcXlStJITPJGdhBSlr0wnQIhAKeTiHwyiENxORD6jQQssHqSu44Tx8BOv4KKt3FGvbvW"}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mem-fs__v4_1_5_4.1.5-cjser.2_1786899082334_0.9050398072918728"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T16:51:22.129Z","4.1.5-cjser.2":"2026-08-16T16:51:22.472Z","modified":"2026-08-16T16:51:22.795Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Simple in-memory vinyl file store","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","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\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/SBoudrias/mem-fs\n","readmeFilename":"README.md","_rev":"1-7d5ad8b1ad59bbfb959572d328f44c41"}