qsu 1.10.4 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/node/file/getFileExtension.d.ts +1 -1
- package/dist/node/file/getFileExtension.js +1 -1
- package/dist/node/file/getFileName.js +1 -1
- package/dist/node/file/getParentFilePath.js +1 -1
- package/dist/node/file/joinFilePath.js +1 -1
- package/dist/node/file/toValidFilePath.js +1 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021-
|
|
3
|
+
Copyright (c) 2021-2026 CDGet <jooy2.contact@gmail.com> (https://cdget.com).
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getFileExtension(filePath: string
|
|
1
|
+
export declare function getFileExtension(filePath: string): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{extname as
|
|
1
|
+
import{extname as e}from"path";import{getFileName as t}from"./getFileName.js";export function getFileExtension(o){const r=e(t(o,!0)).replace(".","").toLowerCase();return r?.length>0?r:null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{posix as e,win32 as n}from"path";export function getFileName(a,t=!1){return-1===a.indexOf("/")&&-1!==a.indexOf("\\")?n.basename(a,t?void 0:n.extname(a))||"":e.basename(a,t?void 0:e.extname(a))||""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toValidFilePath as t}from"./toValidFilePath.js";export function getParentFilePath(
|
|
1
|
+
import{toValidFilePath as t}from"./toValidFilePath.js";import{posix as r,win32 as e}from"path";export function getParentFilePath(i,a){return t(a?e.dirname(i):r.dirname(i),a)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{posix as o,win32 as i}from"path";import{toValidFilePath as t}from"./toValidFilePath.js";export function joinFilePath(r,...n){return r?
|
|
1
|
+
import{posix as o,win32 as i}from"path";import{toValidFilePath as t}from"./toValidFilePath.js";export function joinFilePath(r,...n){return t(r?i.join(...n):o.join(...n),r)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function toValidFilePath(
|
|
1
|
+
import{posix as e,win32 as t}from"path";export function toValidFilePath(i,n){if(i?.length<1)return n?"\\":"/";if(n){let e=i;return e=t.normalize(e).replace(/\.$/g,""),e.endsWith("\\")&&e.length>1&&(e=e.replace(/\\+$/,"")),e.endsWith(":")&&(e=`${e}\\`),e.startsWith("\\")||-1!==e.indexOf(":")||(e=`\\${e}`),e}{let t=i;return t=e.normalize(t),e.isAbsolute(t)||(t=`/${t}`),t.endsWith("/")&&t.length>1&&(t=t.slice(0,-1)),t}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qsu",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.",
|
|
5
5
|
"author": "CDGet <jooy2.contact@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc --project tsconfig.prod.json && npm run minify",
|
|
19
|
-
"test": "npm run build && glob -c \"tsx --test\" \"./test/**/*.test.ts\"",
|
|
19
|
+
"test": "npm run build && glob-bin -c \"tsx --test\" \"./test/**/*.test.ts\"",
|
|
20
20
|
"lint": "eslint . --ext .js,.ts .",
|
|
21
21
|
"lint:fix": "eslint . --ext .js,.ts --fix .",
|
|
22
22
|
"minify": "terser-glob 'dist/**/*.js' --config-file terser.config.json",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"eslint": "^9.39.1",
|
|
81
81
|
"eslint-config-prettier": "^10.1.8",
|
|
82
82
|
"eslint-plugin-n": "^17.23.1",
|
|
83
|
-
"glob": "^
|
|
83
|
+
"glob-bin": "^1.0.0",
|
|
84
84
|
"globals": "^16.5.0",
|
|
85
85
|
"jiti": "^2.6.1",
|
|
86
86
|
"prettier": "^3.6.2",
|