@jackens/nnn 2024.2.25 → 2024.2.26
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/nnn.d.ts +10 -8
- package/nnn.js +1 -3
- package/package.json +1 -1
- package/readme.md +11 -9
package/nnn.d.ts
CHANGED
|
@@ -115,14 +115,16 @@ export declare const has: (key: any, ref: any) => boolean;
|
|
|
115
115
|
/**
|
|
116
116
|
* A helper that checks if the given argument is of a certain type.
|
|
117
117
|
*/
|
|
118
|
-
export declare
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
export declare const is: {
|
|
119
|
+
(type: BigIntConstructor, arg: any): arg is bigint;
|
|
120
|
+
(type: BooleanConstructor, arg: any): arg is boolean;
|
|
121
|
+
(type: NumberConstructor, arg: any): arg is number;
|
|
122
|
+
(type: ObjectConstructor, arg: any): arg is Partial<Record<PropertyKey, any>>;
|
|
123
|
+
(type: StringConstructor, arg: any): arg is string;
|
|
124
|
+
(type: SymbolConstructor, arg: any): arg is symbol;
|
|
125
|
+
(type: undefined, arg: any): arg is undefined | null;
|
|
126
|
+
<T extends abstract new (...args: any[]) => any>(type: T, arg: any): arg is InstanceType<T>;
|
|
127
|
+
};
|
|
126
128
|
|
|
127
129
|
/**
|
|
128
130
|
* The type of arguments of the `jcss` helper.
|
package/nnn.js
CHANGED
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Jackens’ JavaScript helpers.
|
|
4
4
|
|
|
5
|
-
<sub>Version: <code class="version">2024.2.
|
|
5
|
+
<sub>Version: <code class="version">2024.2.26</code></sub>
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -374,14 +374,16 @@ expect(has('key', null)).toBeFalse()
|
|
|
374
374
|
### is
|
|
375
375
|
|
|
376
376
|
```ts
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
377
|
+
const is: {
|
|
378
|
+
(type: BigIntConstructor, arg: any): arg is bigint;
|
|
379
|
+
(type: BooleanConstructor, arg: any): arg is boolean;
|
|
380
|
+
(type: NumberConstructor, arg: any): arg is number;
|
|
381
|
+
(type: ObjectConstructor, arg: any): arg is Partial<Record<PropertyKey, any>>;
|
|
382
|
+
(type: StringConstructor, arg: any): arg is string;
|
|
383
|
+
(type: SymbolConstructor, arg: any): arg is symbol;
|
|
384
|
+
(type: undefined, arg: any): arg is undefined | null;
|
|
385
|
+
<T extends abstract new (...args: any[]) => any>(type: T, arg: any): arg is InstanceType<T>;
|
|
386
|
+
};
|
|
385
387
|
```
|
|
386
388
|
|
|
387
389
|
A helper that checks if the given argument is of a certain type.
|