@cabloy/utils 2.0.23 → 2.1.1

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/dist/index.js CHANGED
@@ -243,6 +243,7 @@ function stringLazy(fn) {
243
243
  };
244
244
  }
245
245
  async function forEach(arr, order, fn) {
246
+ if (!arr) return;
246
247
  if (order) {
247
248
  for (let index = 0; index < arr.length; index++) {
248
249
  await fn(arr[index], index);
package/dist/match.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export type TypeMatchSelectorFunction = (this: any, ...args: any[]) => boolean;
2
2
  export type TypeMatchSelectorRule<T> = T | RegExp | TypeMatchSelectorFunction;
3
- export type TypeMatchSelectorRules<T> = (TypeMatchSelectorRule<T>)[] | TypeMatchSelectorRule<T>;
3
+ export type TypeMatchSelectorRules<T> = TypeMatchSelectorRule<T>[] | TypeMatchSelectorRule<T>;
4
4
  export declare function matchSelector<T>(match: TypeMatchSelectorRules<T>, selector: string | boolean, matchThis?: any, ...matchArgs: any[]): any;
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@cabloy/utils",
3
- "type": "module",
4
- "version": "2.0.23",
3
+ "version": "2.1.1",
4
+ "gitHead": "991189da4443b789fcf77872990b901ccf43bccb",
5
5
  "description": "cabloy utils",
6
- "publishConfig": {
7
- "access": "public"
8
- },
9
- "author": "zhennann",
10
6
  "keywords": [
11
- "framework",
12
- "cabloy"
7
+ "cabloy",
8
+ "framework"
13
9
  ],
10
+ "author": "zhennann",
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "type": "module",
14
15
  "exports": {
15
16
  ".": {
16
17
  "types": [
@@ -21,18 +22,20 @@
21
22
  },
22
23
  "./package.json": "./package.json"
23
24
  },
24
- "files": [
25
- "dist"
26
- ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "scripts": {
29
+ "clean": "rimraf dist tsconfig.tsbuildinfo",
30
+ "tsc:publish": "npm run clean && vona :bin:buildGeneral && tsc",
31
+ "prepublishOnly": "npm run tsc:publish",
32
+ "prepack": "clean-package",
33
+ "postpack": "clean-package restore"
34
+ },
27
35
  "dependencies": {
28
- "@cabloy/module-info": "^1.3.41",
36
+ "@cabloy/module-info": "^2.0.0",
29
37
  "@cabloy/word-utils": "^2.0.2",
30
38
  "@marcbachmann/cel-js": "^7.2.0",
31
39
  "object-hash": "^3.0.0"
32
- },
33
- "gitHead": "0eab9dc4a5622caffe89e7b1b3f02c08ccbc4c4b",
34
- "scripts": {
35
- "clean": "rimraf dist tsconfig.tsbuildinfo",
36
- "tsc:publish": "npm run clean && vona :bin:buildGeneral && tsc"
37
40
  }
38
- }
41
+ }