@d-matrix/utils 1.9.0 → 1.9.2

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/dist/file.d.ts CHANGED
@@ -36,7 +36,7 @@ export declare function isImageExists(src: string, img?: HTMLImageElement): Prom
36
36
  export declare function getFilenameFromContentDispositionHeader(header: {
37
37
  ['content-disposition']: string;
38
38
  }): string;
39
- declare const HyperLinkTargets: readonly ["_self", "_black", "_parent", "_top"];
39
+ declare const HyperLinkTargets: readonly ["_self", "_blank", "_parent", "_top"];
40
40
  export declare type HyperLinkTarget = (typeof HyperLinkTargets)[number];
41
41
  /**
42
42
  * 文件下载
package/dist/file.js CHANGED
@@ -78,7 +78,7 @@ export function getFilenameFromContentDispositionHeader(header) {
78
78
  const filename = contentDisposition.split('filename=')[1].split(';')[0];
79
79
  return decodeURIComponent(filename);
80
80
  }
81
- const HyperLinkTargets = ['_self', '_black', '_parent', '_top'];
81
+ const HyperLinkTargets = ['_self', '_blank', '_parent', '_top'];
82
82
  export function download(source, fileName = '', target) {
83
83
  const link = document.createElement('a');
84
84
  if (typeof source === 'string') {
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * as types from './types';
6
6
  export * as algorithm from './algorithm';
7
7
  export * as file from './file';
8
8
  export * as support from './support';
9
+ export * as timer from './timer';
package/dist/index.js CHANGED
@@ -6,3 +6,4 @@ export * as types from './types';
6
6
  export * as algorithm from './algorithm';
7
7
  export * as file from './file';
8
8
  export * as support from './support';
9
+ export * as timer from './timer';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d-matrix/utils",
3
3
  "sideEffects": false,
4
- "version": "1.9.0",
4
+ "version": "1.9.2",
5
5
  "description": "A dozen of utils for Front-End Development",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
package/readme.md CHANGED
@@ -263,7 +263,7 @@ type HyperLinkTarget = "_self" | "_black" | "_parent" | "_top"
263
263
 
264
264
  使用`setTimeout`与`Promise`实现,暂停执行`ms`毫秒
265
265
 
266
- ```
266
+ ```ts
267
267
  await sleep(3000); // 暂停3秒
268
268
  console.log('continue'); // 继续执行
269
269
  ```