New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

dirfile

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dirfile - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+19
test.js
let dirfile = require('./index');
let path = require('path');
const dirpath = 'd:/ader/ader';
const async = false;
const deep = true;
const extname = 'sql';
let fileArr = dirfile(dirpath,async,deep,function(filePath,stat){
var ext = path.extname(filePath).toLowerCase(),
extArr = extname.split(',').map(item=>{
return item.startsWith('.') ? item : '.'+item;
}).join(',');
return ext != '' && extArr.toLowerCase().indexOf(ext) > -1;
},function(filePath,stat){
return filePath;
});
console.log(fileArr.length);
+1
-1
{
"name": "dirfile",
"version": "1.0.1",
"version": "1.0.2",
"description": "获取文件夹内所有的文件。支持递归获取、异步或同步、过滤、返回信息处理。",

@@ -5,0 +5,0 @@ "main": "index.js",