✏️ 编辑:index.d.ts
路径:
/home/boguraj1/public_html/jobsite/node_modules/junk/index.d.ts
大小:718 B · 修改:2022-11-21 20:09:28 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
declare const junk: { /** Returns `true` if `filename` matches a junk file. */ is(filename: string): boolean; /** Returns `true` if `filename` doesn't match a junk file. @example ``` import {promisify} from 'util'; import * as fs from 'fs'; import junk = require('junk'); const pReaddir = promisify(fs.readdir); (async () => { const files = await pReaddir('some/path'); console.log(files); //=> ['.DS_Store', 'test.jpg'] console.log(files.filter(junk.not)); //=> ['test.jpg'] })(); ``` */ not(filename: string): boolean; /** Regex used for matching junk files. */ readonly regex: RegExp; // TODO: Remove this for the next major release default: typeof junk; }; export = junk;
💾 保存
取消
保存为 UTF-8,换行统一为 LF