Gathering detailed insights and metrics for mem-fs
Gathering detailed insights and metrics for mem-fs
Gathering detailed insights and metrics for mem-fs
Gathering detailed insights and metrics for mem-fs
mem-fs-editor
File edition helpers working on top of mem-fs
@umijs/mem-fs-editor
File edition helpers working on top of mem-fs
@types/mem-fs
Stub TypeScript definitions entry for mem-fs, which provides its own types definitions
@types/mem-fs-editor
Stub TypeScript definitions entry for mem-fs-editor, which provides its own types definitions
npm install mem-fs
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
126 Stars
76 Commits
14 Forks
9 Watchers
23 Branches
6 Contributors
Updated on May 02, 2025
Latest Version
4.1.2
Package Id
mem-fs@4.1.2
Unpacked Size
8.82 kB
Size
2.67 kB
File Count
4
NPM Version
10.8.2
Node Version
22.12.0
Published on
Dec 12, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Simple in-memory vinyl file store.
You 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.
1import { create } from 'mem-fs'; 2 3const store = create(); 4store.get('/test/file.txt');
When 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
.
Trying to get a directory or any invalid files will also return an empty Vinyl file pointer.
You update file references by using store#add()
method. This method take a vinyl
file object as parameter.
1import File from 'vinyl'; 2import { create } from 'mem-fs'; 3 4const coffeeFile = new File({ 5 cwd: '/', 6 base: '/test/', 7 path: '/test/file.coffee', 8 contents: new Buffer('test = 123'), 9}); 10 11const store = create(); 12store.add(coffeeFile);
Using store#each(cb(file, index))
, you can iterate over every file stored in the file system.
Using store#all()
, you can get every file stored in the file system.
Using store#existsInMemory()
, you can check if the file already exists in the file system without loading it from disk.
Using store#stream()
, you can create a stream with every file stored in the file system.
store#pipeline()
generates a new map with yielded files in transforms.
If no transform is passed, files references are updated.
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 11/30 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
1 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More