xshell 1.0.167 → 1.0.168

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.167",
3
+ "version": "1.0.168",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -137,7 +137,7 @@ declare global {
137
137
  interface Array<T> {
138
138
  /** 等价于 .at(-1) */
139
139
  last: T;
140
- indent(this: string[], width: number, c?: string): string[];
140
+ indent(this: string[], width?: number, c?: string): string[];
141
141
  /**
142
142
  - trim_line?: `true`
143
143
  - rm_empty_lines?: `true`
package/prototype.d.ts CHANGED
@@ -161,7 +161,7 @@ declare global {
161
161
  /** 等价于 .at(-1) */
162
162
  last: T;
163
163
  log(this: string[], limit?: number): void;
164
- indent(this: string[], width: number, c?: string): string[];
164
+ indent(this: string[], width?: number, c?: string): string[];
165
165
  indent2to4(this: string[]): string[];
166
166
  /**
167
167
  - trim_line?: `true`
@@ -70,7 +70,7 @@ export declare function encode(str: string): Uint8Array;
70
70
  在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
71
71
  export declare function decode(buffer: Uint8Array): string;
72
72
  /** 字符串字典序比较 */
73
- export declare function strcmp(l: string, r: string): 0 | 1 | -1;
73
+ export declare function strcmp(l: string, r: string): 1 | 0 | -1;
74
74
  /** 比较 1.10.02 这种版本号
75
75
  - l, r: 两个版本号字符串
76
76
  - loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
package/utils.d.ts CHANGED
@@ -37,7 +37,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
37
37
  /** 忽略对象中的 keys, 返回新对象 */
38
38
  export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
39
39
  /** 字符串字典序比较 */
40
- export declare function strcmp(l: string, r: string): 0 | 1 | -1;
40
+ export declare function strcmp(l: string, r: string): 1 | 0 | -1;
41
41
  /** 比较 1.10.02 这种版本号
42
42
  - l, r: 两个版本号字符串
43
43
  - loose?: 宽松模式,允许两个版本号格式(位数)不一致 */