hsu-utils 0.0.54 → 0.0.55

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,8 +1,8 @@
1
1
  /*!
2
2
  *
3
- * hsu-utils v0.0.53
3
+ * hsu-utils v0.0.55
4
4
  *
5
- * some front-end utils
5
+ * 常用前端工具集:深拷贝、类型判断、相等比较、文件下载、PDF 渲染、日期范围、控制台表格等
6
6
  *
7
7
  * MIT License
8
8
  *
@@ -1,8 +1,10 @@
1
1
  import dayjs from 'dayjs';
2
2
  import quarterOfYear from 'dayjs/plugin/quarterOfYear';
3
3
  import weekOfYear from 'dayjs/plugin/weekOfYear';
4
+ import advancedFormat from 'dayjs/plugin/advancedFormat';
4
5
  dayjs.extend(quarterOfYear);
5
6
  dayjs.extend(weekOfYear);
7
+ dayjs.extend(advancedFormat);
6
8
  function getFormat(type, unit = 'day', hasTime = false) {
7
9
  let baseFormat;
8
10
  switch (type) {
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var dayjs_1 = __importDefault(require("dayjs"));
7
7
  var quarterOfYear_1 = __importDefault(require("dayjs/plugin/quarterOfYear"));
8
8
  var weekOfYear_1 = __importDefault(require("dayjs/plugin/weekOfYear"));
9
+ var advancedFormat_1 = __importDefault(require("dayjs/plugin/advancedFormat"));
9
10
  dayjs_1.default.extend(quarterOfYear_1.default);
10
11
  dayjs_1.default.extend(weekOfYear_1.default);
12
+ dayjs_1.default.extend(advancedFormat_1.default);
11
13
  function getFormat(type, unit, hasTime) {
12
14
  if (unit === void 0) { unit = 'day'; }
13
15
  if (hasTime === void 0) { hasTime = false; }
package/package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "name": "hsu-utils",
3
- "version": "0.0.54",
4
- "description": "some front-end utils",
5
- "repository": "git@github.com:VitaTsui/hsu-utils.git",
3
+ "version": "0.0.55",
4
+ "description": "常用前端工具集:深拷贝、类型判断、相等比较、文件下载、PDF 渲染、日期范围、控制台表格等",
5
+ "keywords": [
6
+ "utils",
7
+ "frontend",
8
+ "deep-copy",
9
+ "download",
10
+ "pdf",
11
+ "date-range",
12
+ "typescript"
13
+ ],
14
+ "homepage": "https://github.com/VitaTsui/hsu-utils#readme",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/VitaTsui/hsu-utils.git"
18
+ },
6
19
  "author": "VitaHsu <vitahsu7@gmail.com>",
7
20
  "license": "MIT",
8
21
  "main": "lib/index.js",