@fnmain/aliyun
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -25,4 +25,4 @@ import OSS from "ali-oss"; | ||
} | ||
export declare function getFileExtension(filePath: string, includeDot?: boolean): string | undefined; | ||
export declare function getFileExtension(filePath: string, includeDot?: boolean): string; | ||
export declare function getFileName(filePath: string): string | undefined; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -49,3 +49,3 @@ "use strict"; | ||
} | ||
return extension; | ||
return extension || ""; | ||
} | ||
@@ -52,0 +52,0 @@ exports.getFileExtension = getFileExtension; |
{ | ||
"name": "@fnmain/aliyun", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "aliyun utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -52,3 +52,3 @@ import OSS from "ali-oss"; | ||
export function getFileExtension(filePath: string, includeDot = false) { | ||
export function getFileExtension(filePath: string, includeDot = false): string { | ||
let extension = filePath.split(".").pop(); | ||
@@ -58,3 +58,3 @@ if (includeDot) { | ||
} | ||
return extension; | ||
return extension || ""; | ||
} | ||
@@ -61,0 +61,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11226