Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@jiaminghi/print
Advanced tools
读取文件状态
创建文件夹
连接文件
复制文件夹到指定位置,若文件夹已存在将被清空后进行复制操作
读取文件夹
递归清空文件夹,若文件夹不存在将被创建
递归清空文件夹
读取文件
写入文件
遍历文件夹
递归遍历文件
递归删除指定 extname 的文件
$ npm install @jiaminghi/fs
import { readFile } from '@jiaminghi/fs'
// do something
type stat = (
path: fs.PathLike,
options: fs.StatOptions = { bigint: false }
) => Promise<fs.Stats | fs.BigIntStats | false>
type mkDir = (path: fs.PathLike, options: fs.MakeDirectoryOptions = {}) => Promise<boolean>
type access = (path: fs.PathLike, mode = fs.constants.F_OK) => Promise<boolean>
type copyDir = (path: fs.PathLike, dest: string) => Promise<boolean>
type readDir = (path: fs.PathLike) => Promise<string[] | false>
type clearDir = (path: fs.PathLike) => Promise<boolean>
type emptyDir = (path: fs.PathLike) => Promise<boolean>
type readFile = (
path: fs.PathLike,
options: { encoding: string; flag?: string } = { encoding: 'utf8' }
) => Promise<string | false>
type writeFile = (
path: fs.PathLike,
data: any,
option: fs.WriteFileOptions = 'utf8'
) => Promise<boolean>
type dirForEach = (path: fs.PathLike, callback: (path: string) => any) => Promise<boolean>
type fileForEach = (path: fs.PathLike, callback: (path: string) => any) => Promise<boolean>
type unlinkDirFileByExtname = (path: fs.PathLike, extnames: string[] = []) => Promise<boolean>
FAQs
Colorful console print for node.js
The npm package @jiaminghi/print receives a total of 5 weekly downloads. As such, @jiaminghi/print popularity was classified as not popular.
We found that @jiaminghi/print demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.