@rcompat/is 0.1.1 → 0.1.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.
@@ -0,0 +1,3 @@
1
+ import type Primitive from "@rcompat/type/Primitive";
2
+ export default function isPrimitive(x: unknown): x is Primitive;
3
+ //# sourceMappingURL=primitive.d.ts.map
@@ -0,0 +1,12 @@
1
+ const primitives = [
2
+ "string",
3
+ "number",
4
+ "boolean",
5
+ "bigint",
6
+ "symbol",
7
+ "undefined",
8
+ ];
9
+ export default function isPrimitive(x) {
10
+ return primitives.includes(typeof x) || x === null;
11
+ }
12
+ //# sourceMappingURL=primitive.js.map
@@ -1,2 +1,2 @@
1
- export default function isUint(x: unknown): x is number | bigint;
1
+ export default function isUint(x: unknown): x is bigint | number;
2
2
  //# sourceMappingURL=uint.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rcompat/is",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Standard library value qualifying",
5
5
  "bugs": "https://github.com/rcompat/rcompat/issues",
6
6
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- export default function isNegativeInteger(x: unknown): x is number | bigint;
2
- //# sourceMappingURL=negative-integer.d.ts.map
@@ -1,5 +0,0 @@
1
- import isInteger from "#integer";
2
- export default function isNegativeInteger(x) {
3
- return isInteger(x) && BigInt(x) < 0n;
4
- }
5
- //# sourceMappingURL=negative-integer.js.map
@@ -1,2 +0,0 @@
1
- export default function isNil(x: unknown): x is null | undefined;
2
- //# sourceMappingURL=nil.d.ts.map
@@ -1,4 +0,0 @@
1
- export default function isNil(x) {
2
- return x === null || x === undefined;
3
- }
4
- //# sourceMappingURL=nil.js.map
@@ -1,2 +0,0 @@
1
- export default function isPositiveInteger(x: unknown): x is number | bigint;
2
- //# sourceMappingURL=positive-integer.d.ts.map
@@ -1,5 +0,0 @@
1
- import isInteger from "#integer";
2
- export default function isPositiveInteger(x) {
3
- return isInteger(x) && BigInt(x) > 0n;
4
- }
5
- //# sourceMappingURL=positive-integer.js.map