xshell 1.2.73 → 1.2.75

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.2.73",
3
+ "version": "1.2.75",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
- import { ident } from "./prototype.browser.js";
2
1
  import { set_platform } from "./platform.common.js";
3
- import { encoder } from "./utils.browser.js";
2
+ import { ident } from "./prototype.common.js";
3
+ import { encoder } from "./utils.common.js";
4
4
  export * from "./platform.common.js";
5
5
  function get_buffer(length) {
6
6
  return new Uint8Array(length);
package/platform.d.ts CHANGED
@@ -1,2 +1 @@
1
- import './prototype.ts';
2
1
  export * from './platform.common.ts';
package/platform.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import timers from 'timers/promises';
2
2
  import strip_ansi from 'strip-ansi';
3
- import "./prototype.js";
4
3
  import { set_platform } from "./platform.common.js";
5
4
  export * from "./platform.common.js";
6
5
  function get_buffer(length) {
package/utils.common.d.ts CHANGED
@@ -163,3 +163,4 @@ export declare function throttle(duration: number, func: Function, delay_first?:
163
163
  /** 防抖,间隔一段时间不再触发时调用 */
164
164
  export declare function debounce(duration: number, func: Function): (this: any, ...args: any[]) => void;
165
165
  export declare function tomorrow(date?: Date | string | number): Date;
166
+ export declare function to_csv_field(str: string): string;
package/utils.common.js CHANGED
@@ -519,4 +519,7 @@ export function tomorrow(date) {
519
519
  date.setDate(date.getDate() + 1);
520
520
  return date;
521
521
  }
522
+ export function to_csv_field(str) {
523
+ return /[,"\n\r]/.test(str) ? str.replaceAll('"', '""').quote('double') : str;
524
+ }
522
525
  //# sourceMappingURL=utils.common.js.map