@wzyjs/utils 0.0.25 → 0.0.27

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.
@@ -1,2 +1,4 @@
1
1
  import dayjs from 'dayjs';
2
+ import 'dayjs/locale/zh-cn';
3
+ export { Dayjs } from 'dayjs';
2
4
  export default dayjs;
@@ -15,4 +15,5 @@ export declare const localforage: {
15
15
  };
16
16
  export * from './style';
17
17
  export * from './element';
18
- export { default as dayjs } from './dayjs';
18
+ export * from './other';
19
+ export { default as dayjs, Dayjs } from './dayjs';
@@ -0,0 +1 @@
1
+ export declare const readClipboard: () => Promise<string>;
@@ -2,5 +2,5 @@ export declare class JsonFile {
2
2
  filePath: string;
3
3
  constructor(filePath: string);
4
4
  get(key: string): Promise<unknown>;
5
- set(key: string, value: string): void;
5
+ set(key: string, value: any): void;
6
6
  }
@@ -3,7 +3,7 @@
3
3
  var nodemailer = require('nodemailer');
4
4
 
5
5
  const fromEmail = '15835196981@163.com';
6
- const fromPass = 'REGDSGDETFECIGKE';
6
+ const fromPass = 'KPTVCFBMRXJVTCGW';
7
7
  const transporter = nodemailer.createTransport({
8
8
  host: 'smtp.163.com',
9
9
  port: 465,
@@ -1,2 +1,4 @@
1
1
  import dayjs from 'dayjs';
2
+ import 'dayjs/locale/zh-cn';
3
+ export { Dayjs } from 'dayjs';
2
4
  export default dayjs;
@@ -1,9 +1,18 @@
1
1
  import dayjs from 'dayjs';
2
- export { default } from 'dayjs';
2
+ export { Dayjs, default } from 'dayjs';
3
3
  import isBetween from 'dayjs/plugin/isBetween';
4
4
  import weekday from 'dayjs/plugin/weekday';
5
5
  import localeData from 'dayjs/plugin/localeData';
6
+ import isoWeek from 'dayjs/plugin/isoWeek';
7
+ import updateLocale from 'dayjs/plugin/updateLocale';
8
+ import 'dayjs/locale/zh-cn';
6
9
 
7
10
  dayjs.extend(isBetween);
8
11
  dayjs.extend(weekday);
9
- dayjs.extend(localeData);
12
+ dayjs.extend(localeData);
13
+ dayjs.extend(isoWeek);
14
+ dayjs.extend(updateLocale);
15
+ dayjs.locale('zh-cn');
16
+ dayjs.updateLocale('zh-cn', {
17
+ weekStart: 1,
18
+ });
@@ -15,4 +15,5 @@ export declare const localforage: {
15
15
  };
16
16
  export * from './style';
17
17
  export * from './element';
18
- export { default as dayjs } from './dayjs';
18
+ export * from './other';
19
+ export { default as dayjs, Dayjs } from './dayjs';
@@ -0,0 +1 @@
1
+ export declare const readClipboard: () => Promise<string>;
@@ -0,0 +1,10 @@
1
+ const readClipboard = async () => {
2
+ try {
3
+ return await navigator.clipboard.readText();
4
+ }
5
+ catch (error) {
6
+ return '';
7
+ }
8
+ };
9
+
10
+ export { readClipboard };
@@ -7,9 +7,10 @@ export { delay, executePromise, handleParams, handleRes2List, locationFn } from
7
7
  export { getFileSize, getRandomNum, limitDecimals } from './common/tools/number.js';
8
8
  export { localforage } from './fe/index.js';
9
9
  import './fe/dayjs.js';
10
- export { default as dayjs } from 'dayjs';
10
+ export { Dayjs, default as dayjs } from 'dayjs';
11
11
  export { flashBackground, flashBorder, hexToRgba } from './fe/style.js';
12
12
  export { getElement, isElementInViewport, scrollIntoView } from './fe/element.js';
13
+ export { readClipboard } from './fe/other.js';
13
14
  export { default as copy } from 'copy-to-clipboard';
14
15
  export { default as classnames } from 'classnames';
15
16
  export { default as md5 } from 'md5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wzyjs/utils",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "description",
5
5
  "author": "wzy",
6
6
  "license": "ISC",
@@ -53,5 +53,5 @@
53
53
  "type": "git",
54
54
  "url": "https://gitee.com/wang-zhenyu/app.git"
55
55
  },
56
- "gitHead": "6b5f13176bbcdcde7e853b480899dbdeb4455606"
56
+ "gitHead": "df22fdc32eef4bfe3a8920a1c3d048f5713bda8e"
57
57
  }