check-types-mini 7.0.10 → 7.0.11

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
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2021 Roy Revelt and other contributors
3
+ Copyright (c) 2010-2022 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -26,14 +26,12 @@
26
26
 
27
27
  ## Install
28
28
 
29
- This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required:
29
+ The latest version is **ESM only**: Node 12+ is needed to use it and it must be `import`ed instead of `require`d. If your project is not on ESM yet and you want to use `require`, use an older version of this program, `6.1.0`.
30
30
 
31
31
  ```bash
32
32
  npm i check-types-mini
33
33
  ```
34
34
 
35
- If you need a legacy version which works with `require`, use version 6.1.0
36
-
37
35
  ## Quick Take
38
36
 
39
37
  ```js
@@ -74,8 +72,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
74
72
 
75
73
  MIT License
76
74
 
77
- Copyright (c) 2010-2021 Roy Revelt and other contributors
78
-
75
+ Copyright (c) 2010-2022 Roy Revelt and other contributors
79
76
 
80
77
  <img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
81
-
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name check-types-mini
3
3
  * @fileoverview Validate options object
4
- * @version 7.0.10
4
+ * @version 7.0.11
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/check-types-mini/}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name check-types-mini
3
3
  * @fileoverview Validate options object
4
- * @version 7.0.10
4
+ * @version 7.0.11
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/check-types-mini/}
@@ -25,7 +25,7 @@ current = ${JSON.stringify(h,null,4)}
25
25
  /**
26
26
  * @name arrayiffy-if-string
27
27
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
28
- * @version 4.0.10
28
+ * @version 4.0.11
29
29
  * @author Roy Revelt, Codsen Ltd
30
30
  * @license MIT
31
31
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -33,7 +33,7 @@ current = ${JSON.stringify(h,null,4)}
33
33
  /**
34
34
  * @name ast-monkey-traverse
35
35
  * @fileoverview Utility library to traverse AST
36
- * @version 3.0.10
36
+ * @version 3.0.11
37
37
  * @author Roy Revelt, Codsen Ltd
38
38
  * @license MIT
39
39
  * {@link https://codsen.com/os/ast-monkey-traverse/}
@@ -41,7 +41,7 @@ current = ${JSON.stringify(h,null,4)}
41
41
  /**
42
42
  * @name ast-monkey-util
43
43
  * @fileoverview Utility library of AST helper functions
44
- * @version 2.0.10
44
+ * @version 2.0.11
45
45
  * @author Roy Revelt, Codsen Ltd
46
46
  * @license MIT
47
47
  * {@link https://codsen.com/os/ast-monkey-util/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "check-types-mini",
3
- "version": "7.0.10",
3
+ "version": "7.0.11",
4
4
  "description": "Validate options object",
5
5
  "keywords": [
6
6
  "compare",
@@ -37,13 +37,15 @@
37
37
  "scripts": {
38
38
  "build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
39
39
  "dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
40
- "dts": "rollup -c",
40
+ "dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
41
41
  "examples": "node '../../ops/scripts/run-examples.js'",
42
42
  "lect": "node '../../ops/lect/lect.js'",
43
43
  "letspublish": "yarn publish || :",
44
44
  "lint": "eslint . --fix",
45
45
  "perf": "node perf/check.js",
46
46
  "prepare": "echo 'ready'",
47
+ "prettier": "prettier",
48
+ "prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
47
49
  "pretest": "yarn run lect && yarn run build",
48
50
  "test": "c8 yarn run unit && yarn run examples && yarn run lint",
49
51
  "unit": "uvu test"
@@ -66,8 +68,8 @@
66
68
  }
67
69
  },
68
70
  "dependencies": {
69
- "arrayiffy-if-string": "^4.0.10",
70
- "ast-monkey-traverse": "^3.0.10",
71
+ "arrayiffy-if-string": "^4.0.11",
72
+ "ast-monkey-traverse": "^3.0.11",
71
73
  "lodash.intersection": "^4.4.0",
72
74
  "lodash.pullall": "^4.2.0",
73
75
  "matcher": "^5.0.0",
package/types/index.d.ts CHANGED
@@ -1,19 +1,23 @@
1
1
  interface Obj {
2
- [key: string]: any;
2
+ [key: string]: any;
3
3
  }
4
4
  interface Opts {
5
- ignoreKeys: string | string[];
6
- ignorePaths: string | string[];
7
- acceptArrays: boolean;
8
- acceptArraysIgnore: string | string[];
9
- enforceStrictKeyset: boolean;
10
- schema: Obj;
11
- msg: string;
12
- optsVarName: string;
5
+ ignoreKeys: string | string[];
6
+ ignorePaths: string | string[];
7
+ acceptArrays: boolean;
8
+ acceptArraysIgnore: string | string[];
9
+ enforceStrictKeyset: boolean;
10
+ schema: Obj;
11
+ msg: string;
12
+ optsVarName: string;
13
13
  }
14
14
  /**
15
15
  * Validate options object
16
16
  */
17
- declare function checkTypesMini(obj: Obj, ref: Obj | null, originalOptions?: Partial<Opts>): void;
17
+ declare function checkTypesMini(
18
+ obj: Obj,
19
+ ref: Obj | null,
20
+ originalOptions?: Partial<Opts>
21
+ ): void;
18
22
 
19
23
  export { checkTypesMini };