Socket
Socket
Sign inDemoInstall

xmcommon

Package Overview
Dependencies
1
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.1.5

7

lib/utils.js

@@ -518,2 +518,6 @@ const _ = require("lodash");

}
/** 检查指定的文件或目录,是否存在 */
static fileExists(paramFullPath) {
return fs.existsSync(paramFullPath);
}

@@ -534,7 +538,6 @@ /**

};
try {
if (!fs.existsSync(paramPath)) {
let pathtmp;
paramPath.split(/[/\\]/).forEach((dirname)=> { //这里指用/ 或\ 都可以分隔目录 如 linux的/usr/local/services 和windows的 d:\temp\aaaa
paramPath.split(/[\/\\]/).forEach((dirname)=> { //这里指用/ 或\ 都可以分隔目录 如 linux的/usr/local/services 和windows的 d:\temp\aaaa
if (pathtmp) {

@@ -541,0 +544,0 @@ pathtmp = path.join(pathtmp, dirname);

{
"name": "xmcommon",
"version": "0.1.4",
"version": "0.1.5",
"description": "javascript common lib for es6",

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

@@ -34,2 +34,7 @@ # xmcommon

## 0.1.5
- 2020-12-24
- \+ 增加fileExists判断文件或目录是否存在
- \* 修复makedirs存在的bug
## 0.1.4

@@ -36,0 +41,0 @@ - 2020-08-20

@@ -364,2 +364,11 @@ // Type definitions for xmcommon 0.0

/**
* 检查指定的文件或目录是否存在
* @param paramPath 指定的文件的目录全路径
* @return 检查结果
* - true 表示存在
* - false 表示不存在
*/
static fileExists(paramPath: string): boolean;
/**

@@ -366,0 +375,0 @@ * 创建目录

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc