Socket
Socket
Sign inDemoInstall

yu-node

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.7 to 1.0.8

12

lib/getAllFiles.js

@@ -5,12 +5,12 @@ const fs = require('fs');

exports.getAllFiles = (dirPath, recursion=true) => {
let arr = [];
const bool = fs.existsSync(dirPath); //判断目录是否存在
if(!bool) return;
let arr = [];
if(!bool) return arr;
dirPath = path.resolve(dirPath);
(function fn(dirPath){
const dirents = fs.readdirSync(dirPath,{ withFileTypes:true });
dirents.forEach(dirent=>{
let child = path.join(dirPath,dirent.name);

@@ -20,3 +20,3 @@ if(dirent.isDirectory()){

}else{
arr.push(path.resolve(child));
arr.push(child);
}

@@ -23,0 +23,0 @@ });

{
"name": "yu-node",
"version": "1.0.7",
"version": "1.0.8",
"description": "仅用于node.js",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc