dir-parser
Advanced tools
+1
-1
@@ -122,3 +122,3 @@ #!/usr/bin/env node | ||
| } else { | ||
| match = match.replace(',', ' ').split(' '); | ||
| match = match.replace(/,/mg, ' ').split(' '); | ||
| } | ||
@@ -125,0 +125,0 @@ } |
+1
-1
| { | ||
| "name": "dir-parser", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "description": "Parse a directory and generate it's structure tree.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+27
-2
@@ -40,3 +40,4 @@ <h1 align="center">😎 文件夹解析器[Dir Parser v2] 😎</h1> | ||
| - [2.3.15 配置文件-config](#2315-配置文件-config) | ||
| - [2.4 多个命令混合使用](#24-多个命令混合使用) | ||
| - [2.4 文件名称包含空格](#24-文件名称包含空格) | ||
| - [2.5 多个命令混合使用](#25-多个命令混合使用) | ||
| - [三、在Js代码中使用](#三在Js代码中使用) | ||
@@ -400,3 +401,27 @@ - [3.1 方法接口](#31-方法接口) | ||
| ### 2.4 多个命令混合使用 | ||
| ### 2.4 文件名称包含空格 | ||
| `touch 'white space.txt'`<br> | ||
| `parser -e '["node_modules", "white space.txt"]'` | ||
| ``` | ||
| myapp ( directories: 7, Files: 10 ) | ||
| ├─ bin | ||
| │ └─ www | ||
| ├─ public | ||
| │ ├─ images/ | ||
| │ ├─ javascripts/ | ||
| │ └─ stylesheets | ||
| │ └─ style.css | ||
| ├─ routes | ||
| │ ├─ index.js | ||
| │ └─ users.js | ||
| ├─ views | ||
| │ ├─ error.jade | ||
| │ ├─ index.jade | ||
| │ └─ layout.jade | ||
| ├─ app.js | ||
| ├─ package.json | ||
| └─ parser.conf.json | ||
| ``` | ||
| ### 2.5 多个命令混合使用 | ||
| `parser -e node_modules,bin -I views -d 2 -Nr` | ||
@@ -403,0 +428,0 @@ ``` |
+27
-2
@@ -40,3 +40,4 @@ <h1 align="center">😎 Dir Parser v2 😎</h1> | ||
| - [2.3.15 config](#2315-config) | ||
| - [2.4 Use multiple commands together](#24-use-multiple-commands-together) | ||
| - [2.4 Name has white space](#24-name-has-white-space) | ||
| - [2.5 Use multiple commands together](#25-use-multiple-commands-together) | ||
| - [3. In JavaScript](#3-in-javascript) | ||
@@ -400,3 +401,27 @@ - [3.1 Interface](#31-interface) | ||
| ### 2.4 Use multiple commands together | ||
| ### 2.4 Name has white space | ||
| `touch 'white space.txt'`<br> | ||
| `parser -e '["node_modules", "white space.txt"]'` | ||
| ``` | ||
| myapp ( directories: 7, Files: 10 ) | ||
| ├─ bin | ||
| │ └─ www | ||
| ├─ public | ||
| │ ├─ images/ | ||
| │ ├─ javascripts/ | ||
| │ └─ stylesheets | ||
| │ └─ style.css | ||
| ├─ routes | ||
| │ ├─ index.js | ||
| │ └─ users.js | ||
| ├─ views | ||
| │ ├─ error.jade | ||
| │ ├─ index.jade | ||
| │ └─ layout.jade | ||
| ├─ app.js | ||
| ├─ package.json | ||
| └─ parser.conf.json | ||
| ``` | ||
| ### 2.5 Use multiple commands together | ||
| `parser -e node_modules,bin -I views -d 2 -Nr` | ||
@@ -403,0 +428,0 @@ ``` |
@@ -51,3 +51,3 @@ const fs = require('fs'); | ||
| } else if (fn.typeVal(ptn, 'str')) { | ||
| return new RegExp(ptn.replace('.', '\\.').replace(/\*/mg, '.*')); | ||
| return new RegExp(ptn.replace(/(\*?)\.([\w\d]*\$+)$/, () => `${RegExp.$1 && '\.*' || ''}\.${RegExp.$2}`)); | ||
| } else { | ||
@@ -54,0 +54,0 @@ return ''; |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
926
2.77%563478
-0.23%