@rcompat/is 0.2.1 → 0.2.2
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/lib/private/index.d.ts +2 -1
- package/lib/private/index.js +4 -1
- package/package.json +1 -1
package/lib/private/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import object from "#object";
|
|
|
5
5
|
import primitive from "#primitive";
|
|
6
6
|
import type Dict from "@rcompat/type/Dict";
|
|
7
7
|
import type Nullish from "@rcompat/type/Nullish";
|
|
8
|
+
declare function isArray(x: unknown): x is unknown[];
|
|
8
9
|
declare function isDate(x: unknown): x is Date;
|
|
9
10
|
declare function isDefined(x: unknown): x is {} | null;
|
|
10
11
|
declare function isDict(x: unknown): x is Dict;
|
|
@@ -18,7 +19,7 @@ declare function isURL(x: unknown): x is URL;
|
|
|
18
19
|
declare function isMap(x: unknown): x is Map<unknown, unknown>;
|
|
19
20
|
declare function isSet(x: unknown): x is Set<unknown>;
|
|
20
21
|
declare const _default: {
|
|
21
|
-
array:
|
|
22
|
+
array: typeof isArray;
|
|
22
23
|
blank: (x: unknown) => x is string;
|
|
23
24
|
boolish: (x: unknown) => x is import("@rcompat/type/Boolish").default;
|
|
24
25
|
date: typeof isDate;
|
package/lib/private/index.js
CHANGED
|
@@ -5,6 +5,9 @@ import numeric from "#numeric";
|
|
|
5
5
|
import object from "#object";
|
|
6
6
|
import primitive from "#primitive";
|
|
7
7
|
import strings from "#strings";
|
|
8
|
+
function isArray(x) {
|
|
9
|
+
return Array.isArray(x);
|
|
10
|
+
}
|
|
8
11
|
function isDate(x) {
|
|
9
12
|
return x instanceof Date;
|
|
10
13
|
}
|
|
@@ -45,7 +48,7 @@ function isSet(x) {
|
|
|
45
48
|
return x instanceof Set;
|
|
46
49
|
}
|
|
47
50
|
export default {
|
|
48
|
-
array:
|
|
51
|
+
array: isArray,
|
|
49
52
|
blank: strings.isBlank,
|
|
50
53
|
boolish: strings.isBoolish,
|
|
51
54
|
date: isDate,
|