@kcuf/helper-data 0.2.2 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.3 2024/11/05 @驳是
4
+
5
+ * FEAT 新增 `isEmptyPagedList`
6
+
3
7
  ## 0.2.0 2024/11/05 @驳是
4
8
 
5
9
  * BREAK Removed Loading stuff
@@ -4,6 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ Object.defineProperty(exports, "isEmptyPagedList", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _isEmptyPagedList.default;
11
+ }
12
+ });
7
13
  Object.defineProperty(exports, "normalizeBoolean", {
8
14
  enumerable: true,
9
15
  get: function get() {
@@ -52,4 +58,5 @@ var _normalizeNumber = _interopRequireDefault(require("./normalize-number"));
52
58
  var _normalizeEnum = _interopRequireDefault(require("./normalize-enum"));
53
59
  var _normalizeTime = _interopRequireDefault(require("./normalize-time"));
54
60
  var _normalizePagedList = _interopRequireDefault(require("./normalize-paged-list"));
55
- var _normalizePagedListUncertain = _interopRequireDefault(require("./normalize-paged-list-uncertain"));
61
+ var _normalizePagedListUncertain = _interopRequireDefault(require("./normalize-paged-list-uncertain"));
62
+ var _isEmptyPagedList = _interopRequireDefault(require("./is-empty-paged-list"));
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = isEmptyPagedList;
7
+ function isEmptyPagedList(paged) {
8
+ return !paged.list.length;
9
+ }
@@ -5,4 +5,5 @@ export { default as normalizeEnum } from './normalize-enum';
5
5
  export { default as normalizeTime } from './normalize-time';
6
6
  export { default as normalizePagedList } from './normalize-paged-list';
7
7
  export { default as normalizePagedListUncertain } from './normalize-paged-list-uncertain';
8
+ export { default as isEmptyPagedList } from './is-empty-paged-list';
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","normalizeId","normalizeBoolean","normalizeNumber","normalizeEnum","normalizeTime","normalizePagedList","normalizePagedListUncertain"],"sources":["../../../src/helper/index.ts"],"sourcesContent":["export { default as normalizeId } from './normalize-id';\nexport { default as normalizeBoolean } from './normalize-boolean';\nexport { default as normalizeNumber } from './normalize-number';\nexport { default as normalizeEnum } from './normalize-enum';\nexport { default as normalizeTime } from './normalize-time';\nexport { default as normalizePagedList } from './normalize-paged-list';\nexport { default as normalizePagedListUncertain } from './normalize-paged-list-uncertain';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,gBAAgB;AACvD,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,qBAAqB;AACjE,SAASF,OAAO,IAAIG,eAAe,QAAQ,oBAAoB;AAC/D,SAASH,OAAO,IAAII,aAAa,QAAQ,kBAAkB;AAC3D,SAASJ,OAAO,IAAIK,aAAa,QAAQ,kBAAkB;AAC3D,SAASL,OAAO,IAAIM,kBAAkB,QAAQ,wBAAwB;AACtE,SAASN,OAAO,IAAIO,2BAA2B,QAAQ,kCAAkC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","normalizeId","normalizeBoolean","normalizeNumber","normalizeEnum","normalizeTime","normalizePagedList","normalizePagedListUncertain","isEmptyPagedList"],"sources":["../../../src/helper/index.ts"],"sourcesContent":["export { default as normalizeId } from './normalize-id';\nexport { default as normalizeBoolean } from './normalize-boolean';\nexport { default as normalizeNumber } from './normalize-number';\nexport { default as normalizeEnum } from './normalize-enum';\nexport { default as normalizeTime } from './normalize-time';\nexport { default as normalizePagedList } from './normalize-paged-list';\nexport { default as normalizePagedListUncertain } from './normalize-paged-list-uncertain';\n\nexport { default as isEmptyPagedList } from './is-empty-paged-list';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,gBAAgB;AACvD,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,qBAAqB;AACjE,SAASF,OAAO,IAAIG,eAAe,QAAQ,oBAAoB;AAC/D,SAASH,OAAO,IAAII,aAAa,QAAQ,kBAAkB;AAC3D,SAASJ,OAAO,IAAIK,aAAa,QAAQ,kBAAkB;AAC3D,SAASL,OAAO,IAAIM,kBAAkB,QAAQ,wBAAwB;AACtE,SAASN,OAAO,IAAIO,2BAA2B,QAAQ,kCAAkC;AAEzF,SAASP,OAAO,IAAIQ,gBAAgB,QAAQ,uBAAuB","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export default function isEmptyPagedList(paged) {
2
+ return !paged.list.length;
3
+ }
4
+ //# sourceMappingURL=is-empty-paged-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty-paged-list.js","names":["isEmptyPagedList","paged","list","length"],"sources":["../../../src/helper/is-empty-paged-list.ts"],"sourcesContent":["import {\n IPagedList\n} from '../types';\n\nexport default function isEmptyPagedList(paged: IPagedList<unknown>): boolean {\n return !paged.list.length;\n}\n"],"mappings":"AAIA,eAAe,SAASA,gBAAgBA,CAACC,KAA0B,EAAW;EAC5E,OAAO,CAACA,KAAK,CAACC,IAAI,CAACC,MAAM;AAC3B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './helper';\n\nexport type {\n // 参数标准化\n IBaseParamsPage as BaseParamsPage,\n IBaseParamsPageWithQ as BaseParamsPageWithQ,\n IBaseParamsCursorPage as BaseParamsCursorPage,\n IBaseParamsCursorPageWithQ as BaseParamsCursorPageWithQ,\n // 数据标准化\n IBaseDataId as BaseDataId,\n IBaseDataName as BaseDataName,\n IBaseDataIdName as BaseDataIdName,\n IBaseDataTitle as BaseDataTitle,\n IBaseDataDescription as BaseDataDescription,\n IBaseDataContent as BaseDataContent,\n IBaseDataTimeCreated as BaseDataTimeCreated,\n IBaseDataTimeUpdated as BaseDataTimeModified,\n IBaseDataTimes as BaseDataTimes,\n IBaseDataCreator as BaseDataCreator,\n IBaseDataUpdater as BaseDataUpdater,\n // 数据标准化(泛型)\n IPagedList as PagedList,\n IPagedCursorList as PagedCursorList,\n IPagedListUncertain as PagedListUncertain\n} from './types';\n"],"mappings":"AAAA,cAAc,UAAU;AAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './helper';\n\nexport type {\n // 参数标准化\n IBaseParamsPage as BaseParamsPage,\n IBaseParamsPageWithQ as BaseParamsPageWithQ,\n IBaseParamsCursorPage as BaseParamsCursorPage,\n IBaseParamsCursorPageWithQ as BaseParamsCursorPageWithQ,\n \n // 数据标准化\n IBaseDataId as BaseDataId,\n IBaseDataName as BaseDataName,\n IBaseDataIdName as BaseDataIdName,\n IBaseDataTitle as BaseDataTitle,\n IBaseDataDescription as BaseDataDescription,\n IBaseDataContent as BaseDataContent,\n IBaseDataTimeCreated as BaseDataTimeCreated,\n IBaseDataTimeUpdated as BaseDataTimeModified,\n IBaseDataTimes as BaseDataTimes,\n IBaseDataCreator as BaseDataCreator,\n IBaseDataUpdater as BaseDataUpdater,\n \n // 数据标准化(泛型)\n IPagedList as PagedList,\n IPagedCursorList as PagedCursorList,\n IPagedListUncertain as PagedListUncertain\n} from './types';\n"],"mappings":"AAAA,cAAc,UAAU;AAAC","ignoreList":[]}
@@ -5,3 +5,4 @@ export { default as normalizeEnum } from './normalize-enum';
5
5
  export { default as normalizeTime } from './normalize-time';
6
6
  export { default as normalizePagedList } from './normalize-paged-list';
7
7
  export { default as normalizePagedListUncertain } from './normalize-paged-list-uncertain';
8
+ export { default as isEmptyPagedList } from './is-empty-paged-list';
@@ -0,0 +1,2 @@
1
+ import { IPagedList } from '../types';
2
+ export default function isEmptyPagedList(paged: IPagedList<unknown>): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kcuf/helper-data",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Data normalizer helpers and loading stuff to make all frontend data processing sane.",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@babel/cli": "^7.28.3",
26
- "@babel/core": "^7.28.4",
27
- "@babel/plugin-transform-runtime": "^7.28.3",
28
- "@babel/preset-env": "^7.28.3",
29
- "@babel/preset-typescript": "^7.27.1",
26
+ "@babel/core": "^7.28.5",
27
+ "@babel/plugin-transform-runtime": "^7.28.5",
28
+ "@babel/preset-env": "^7.28.5",
29
+ "@babel/preset-typescript": "^7.28.5",
30
30
  "rimraf": "^6.0.1",
31
31
  "typescript": "^5.9.3",
32
32
  "@kcuf/ts-config": "^0.0.1"