xjs-common 8.3.0 → 8.3.1

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![CI](https://github.com/begyyal/xjs_commons/actions/workflows/test.yml/badge.svg)](https://github.com/begyyal/xjs_commons/actions/workflows/test.yml)
1
+ [![npm][npm-badge]][npm-url] [![CI][ci-badge]][ci-url]
2
2
 
3
3
  # Overview
4
4
  Library modules for nodejs + typescript that bundled general-purpose implementations.
@@ -219,3 +219,8 @@ XJS throws error with `code` property which has one of the following numbers.
219
219
 
220
220
  # License
221
221
  [Apache-License](./LICENSE)
222
+
223
+ [npm-url]: https://npmjs.org/package/xjs-common
224
+ [npm-badge]: https://badgen.net/npm/v/xjs-common
225
+ [ci-url]: https://github.com/begyyal/xjs_commons/actions/workflows/test.yml
226
+ [ci-badge]: https://github.com/begyyal/xjs_commons/actions/workflows/test.yml/badge.svg
@@ -9,5 +9,5 @@ export declare namespace UFile {
9
9
  function read(p: MaybeArray<string>, encoding: BufferEncoding): string;
10
10
  function cp(from: MaybeArray<string>, to: MaybeArray<string>): void;
11
11
  function mv(from: MaybeArray<string>, to: MaybeArray<string>): void;
12
- function joinPath(p: MaybeArray<string>): string;
12
+ function joinPath(...p: MaybeArray<string>[]): string;
13
13
  }
@@ -74,8 +74,8 @@ var UFile;
74
74
  fs.renameSync(f, t);
75
75
  }
76
76
  UFile.mv = mv;
77
- function joinPath(p) {
78
- return u_type_1.UType.isString(p) ? p : path.join(...p);
77
+ function joinPath(...p) {
78
+ return path.join(...p.flatMap(u_type_1.UType.takeAsArray));
79
79
  }
80
80
  UFile.joinPath = joinPath;
81
81
  })(UFile = exports.UFile || (exports.UFile = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xjs-common",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "description": "library modules for nodejs + typescript that bundled general-purpose implementations.",
5
5
  "repository": {
6
6
  "type": "git",