@thi.ng/checks 3.3.13 → 3.4.0
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 +7 -1
- package/README.md +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/is-generator.d.ts +8 -0
- package/is-generator.js +9 -0
- package/package.json +12 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-
|
|
3
|
+
- **Last updated**: 2023-08-04T10:58:19Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
## [3.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/checks@3.4.0) (2023-08-04)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- add isGenerator() ([af8ffb3](https://github.com/thi-ng/umbrella/commit/af8ffb3))
|
|
17
|
+
|
|
12
18
|
### [3.3.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/checks@3.3.5) (2022-12-16)
|
|
13
19
|
|
|
14
20
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
package/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./is-file.js";
|
|
|
26
26
|
export * from "./is-firefox.js";
|
|
27
27
|
export * from "./is-float-string.js";
|
|
28
28
|
export * from "./is-function.js";
|
|
29
|
+
export * from "./is-generator.js";
|
|
29
30
|
export * from "./is-hex.js";
|
|
30
31
|
export * from "./is-hex-color.js";
|
|
31
32
|
export * from "./is-ie.js";
|
package/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./is-file.js";
|
|
|
26
26
|
export * from "./is-firefox.js";
|
|
27
27
|
export * from "./is-float-string.js";
|
|
28
28
|
export * from "./is-function.js";
|
|
29
|
+
export * from "./is-generator.js";
|
|
29
30
|
export * from "./is-hex.js";
|
|
30
31
|
export * from "./is-hex-color.js";
|
|
31
32
|
export * from "./is-ie.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if `x` is an instantiated ES6 generator (i.e. it
|
|
3
|
+
* {@link isIterable} and {@link implementsFunction} `next`).
|
|
4
|
+
*
|
|
5
|
+
* @param x
|
|
6
|
+
*/
|
|
7
|
+
export declare const isGenerator: (x: any) => x is Generator<unknown, any, unknown>;
|
|
8
|
+
//# sourceMappingURL=is-generator.d.ts.map
|
package/is-generator.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { implementsFunction } from "./implements-function.js";
|
|
2
|
+
import { isIterable } from "./is-iterable.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if `x` is an instantiated ES6 generator (i.e. it
|
|
5
|
+
* {@link isIterable} and {@link implementsFunction} `next`).
|
|
6
|
+
*
|
|
7
|
+
* @param x
|
|
8
|
+
*/
|
|
9
|
+
export const isGenerator = (x) => isIterable(x) && implementsFunction(x, "next");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/checks",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Collection of 70+ type, feature & value checks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"test": "testament test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"tslib": "^2.
|
|
41
|
+
"tslib": "^2.6.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@microsoft/api-extractor": "^7.
|
|
45
|
-
"@thi.ng/testament": "^0.3.
|
|
46
|
-
"@types/node": "^20.
|
|
47
|
-
"rimraf": "^5.0.
|
|
44
|
+
"@microsoft/api-extractor": "^7.36.3",
|
|
45
|
+
"@thi.ng/testament": "^0.3.18",
|
|
46
|
+
"@types/node": "^20.4.6",
|
|
47
|
+
"rimraf": "^5.0.1",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.24.
|
|
50
|
-
"typescript": "^5.
|
|
49
|
+
"typedoc": "^0.24.8",
|
|
50
|
+
"typescript": "^5.1.6"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"detect",
|
|
@@ -158,6 +158,9 @@
|
|
|
158
158
|
"./is-function": {
|
|
159
159
|
"default": "./is-function.js"
|
|
160
160
|
},
|
|
161
|
+
"./is-generator": {
|
|
162
|
+
"default": "./is-generator.js"
|
|
163
|
+
},
|
|
161
164
|
"./is-hex-color": {
|
|
162
165
|
"default": "./is-hex-color.js"
|
|
163
166
|
},
|
|
@@ -276,5 +279,5 @@
|
|
|
276
279
|
"default": "./is-zero.js"
|
|
277
280
|
}
|
|
278
281
|
},
|
|
279
|
-
"gitHead": "
|
|
282
|
+
"gitHead": "9fa3f7f8169efa30e3c71b43c82f77393581c3b5\n"
|
|
280
283
|
}
|