Gathering detailed insights and metrics for safefs
Gathering detailed insights and metrics for safefs
Deprecated. Use the @bevry/fs-* packages instead
npm install safefs
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.8
Supply Chain
100
Quality
76.2
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
75,035,406
Last Day
23,386
Last Week
102,367
Last Month
486,770
Last Year
6,461,465
7 Stars
266 Commits
3 Forks
2 Watching
2 Branches
5 Contributors
Minified
Minified + Gzipped
Latest Version
8.10.0
Package Id
safefs@8.10.0
Unpacked Size
35.99 kB
Size
10.66 kB
File Count
6
NPM Version
10.2.3
Node Version
20.10.0
Publised On
02 Jan 2024
Cumulative downloads
Total Downloads
Last day
-42.8%
23,386
Compared to previous day
Last week
-26%
102,367
Compared to previous week
Last month
3.8%
486,770
Compared to previous month
Last year
1.6%
6,461,465
Compared to previous year
Stop getting EMFILE errors! Open only as many files as the operating system supports.
1var safefs = require('safefs')
SafeFS uses graceful-fs to wrap all of the standard file system methods to avoid EMFILE errors among other problems.
On-top of graceful-fs, SafeFS also adds additional wrapping on the following methods:
writeFile(path, data, options?, next)
- ensure the full path exists before writing to itappendFile(path, data, options?, next)
- ensure the full path exists before writing to itmkdir(path, mode?, next)
- mode defaults to 0o777 & (~process.umask())
unlink(path, next)
- checks if the file exists before removing itSafeFS also define these additional methods:
ensurePath(path, options, next)
- ensure the full path exists, equivalent to unix's mdir -p path
getParentPathSync(path)
- returns the parent directory of the pathYou should use these instead, which use and provide modern APIs while providing brilliant ecosystem support:
npm install --save safefs
import * as pkg from ('safefs')
const pkg = require('safefs')
This package is published with the following editions:
safefs
aliases safefs/source/index.js
safefs/source/index.js
is ESNext source code for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modulesThis project provides its type information via inline JSDoc Comments. To make use of this in TypeScript, set your maxNodeModuleJsDepth
compiler option to 5
or thereabouts. You can accomplish this via your tsconfig.json
file like so:
1{ 2 "compilerOptions": { 3 "maxNodeModuleJsDepth": 5 4 } 5}
Discover the release history by heading on over to the HISTORY.md
file.
Discover how to contribute via the CONTRIBUTING.md
file.
Unless stated otherwise all works are:
and licensed under:
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 5
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
Found 0/20 approved changesets -- score normalized to 0
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
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-02-03
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