xshell 1.3.7 → 1.3.8
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/package.json +1 -1
- package/path.d.ts +2 -2
- package/utils.common.d.ts +2 -0
- package/utils.common.js +4 -0
package/package.json
CHANGED
package/path.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare function extname(path: string): string;
|
|
|
54
54
|
/** `/` */
|
|
55
55
|
export declare const sep = "/";
|
|
56
56
|
/** The platform-specific file delimiter. ';' or ':'. */
|
|
57
|
-
export declare const delimiter: "
|
|
57
|
+
export declare const delimiter: ":" | ";";
|
|
58
58
|
/** Returns an object from a path string - the opposite of format().
|
|
59
59
|
@param path path to evaluate.
|
|
60
60
|
@throws {TypeError} if `path` is not a string. */
|
|
@@ -81,7 +81,7 @@ export declare let path: {
|
|
|
81
81
|
basename: typeof basename;
|
|
82
82
|
extname: typeof extname;
|
|
83
83
|
sep: string;
|
|
84
|
-
delimiter: "
|
|
84
|
+
delimiter: ":" | ";";
|
|
85
85
|
parse: typeof parse;
|
|
86
86
|
format: typeof format;
|
|
87
87
|
toNamespacedPath: typeof toNamespacedPath;
|
package/utils.common.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare function assert<T>(assertion: T, message?: string): T;
|
|
|
6
6
|
export declare function check<T>(condition: T, message?: string): T;
|
|
7
7
|
/** 生成随机 id (number) */
|
|
8
8
|
export declare function genid(): number;
|
|
9
|
+
/** 生成随机 uint32 */
|
|
10
|
+
export declare function genu32(): number;
|
|
9
11
|
/** 通过 console.log 打印对象并返回
|
|
10
12
|
@example
|
|
11
13
|
log('label', obj)
|
package/utils.common.js
CHANGED
|
@@ -23,6 +23,10 @@ export function check(condition, message) {
|
|
|
23
23
|
export function genid() {
|
|
24
24
|
return Math.random() * 2 ** 53;
|
|
25
25
|
}
|
|
26
|
+
/** 生成随机 uint32 */
|
|
27
|
+
export function genu32() {
|
|
28
|
+
return Math.random() * 2 ** 32 >>> 0;
|
|
29
|
+
}
|
|
26
30
|
export function log(...args) {
|
|
27
31
|
if (args.length === 2) {
|
|
28
32
|
const [label, obj] = args;
|