@miyauci/isx
Advanced tools
Comparing version 1.2.0 to 1.3.0-beta.1
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
/** Whether the input is odd or not. | ||
@@ -6,0 +4,0 @@ * @param input - Any `number`. |
134
package.json
{ | ||
"name": "@miyauci/isx", | ||
"version": "1.2.0", | ||
"version": "1.3.0-beta.1", | ||
"description": "Collection of validation functions for JavaScript data", | ||
@@ -34,88 +34,94 @@ "license": "MIT", | ||
"*": { | ||
"date/is_valid_date": [ | ||
"date/is_valid_date.js": [ | ||
"types/date/is_valid_date.d.ts" | ||
], | ||
"is_array": [ | ||
"is_array.js": [ | ||
"types/is_array.d.ts" | ||
], | ||
"is_async_iterable": [ | ||
"is_async_iterable.js": [ | ||
"types/is_async_iterable.d.ts" | ||
], | ||
"is_bigint": [ | ||
"is_bigint.js": [ | ||
"types/is_bigint.d.ts" | ||
], | ||
"is_boolean": [ | ||
"is_boolean.js": [ | ||
"types/is_boolean.d.ts" | ||
], | ||
"is_date": [ | ||
"is_date.js": [ | ||
"types/is_date.d.ts" | ||
], | ||
"is_error": [ | ||
"is_error.js": [ | ||
"types/is_error.d.ts" | ||
], | ||
"is_function": [ | ||
"is_function.js": [ | ||
"types/is_function.d.ts" | ||
], | ||
"is_iterable": [ | ||
"is_iterable.js": [ | ||
"types/is_iterable.d.ts" | ||
], | ||
"is_null": [ | ||
"is_non_nullable.js": [ | ||
"types/is_non_nullable.d.ts" | ||
], | ||
"is_null.js": [ | ||
"types/is_null.d.ts" | ||
], | ||
"is_nullable": [ | ||
"is_nullable.js": [ | ||
"types/is_nullable.d.ts" | ||
], | ||
"is_number": [ | ||
"is_number.js": [ | ||
"types/is_number.d.ts" | ||
], | ||
"is_object": [ | ||
"is_object.js": [ | ||
"types/is_object.d.ts" | ||
], | ||
"is_primitive": [ | ||
"is_primitive.js": [ | ||
"types/is_primitive.d.ts" | ||
], | ||
"is_promise": [ | ||
"is_promise.js": [ | ||
"types/is_promise.d.ts" | ||
], | ||
"is_reg_exp": [ | ||
"is_reg_exp.js": [ | ||
"types/is_reg_exp.d.ts" | ||
], | ||
"is_string": [ | ||
"is_string.js": [ | ||
"types/is_string.d.ts" | ||
], | ||
"is_symbol": [ | ||
"is_symbol.js": [ | ||
"types/is_symbol.d.ts" | ||
], | ||
"is_undefined": [ | ||
"is_undefined.js": [ | ||
"types/is_undefined.d.ts" | ||
], | ||
"iterable/is_empty": [ | ||
"iterable/is_empty.js": [ | ||
"types/iterable/is_empty.d.ts" | ||
], | ||
"iterable/is_not_empty": [ | ||
"iterable/is_not_empty.js": [ | ||
"types/iterable/is_not_empty.d.ts" | ||
], | ||
"iterable/is_single": [ | ||
"iterable/is_single.js": [ | ||
"types/iterable/is_single.d.ts" | ||
], | ||
"number/is_even": [ | ||
"number/is_even.js": [ | ||
"types/number/is_even.d.ts" | ||
], | ||
"number/is_negative_number": [ | ||
"number/is_negative_number.js": [ | ||
"types/number/is_negative_number.d.ts" | ||
], | ||
"number/is_non_negative_integer": [ | ||
"number/is_non_negative_integer.js": [ | ||
"types/number/is_non_negative_integer.d.ts" | ||
], | ||
"number/is_non_negative_number": [ | ||
"number/is_non_negative_number.js": [ | ||
"types/number/is_non_negative_number.d.ts" | ||
], | ||
"number/is_non_positive_number": [ | ||
"number/is_non_positive_number.js": [ | ||
"types/number/is_non_positive_number.d.ts" | ||
], | ||
"number/is_odd": [ | ||
"number/is_odd.js": [ | ||
"types/number/is_odd.d.ts" | ||
], | ||
"number/is_positive_number": [ | ||
"number/is_positive_number.js": [ | ||
"types/number/is_positive_number.d.ts" | ||
], | ||
"number/is_unit_interval.js": [ | ||
"types/number/is_unit_interval.d.ts" | ||
] | ||
@@ -125,3 +131,3 @@ } | ||
"exports": { | ||
"./date/is_valid_date": { | ||
"./date/is_valid_date.js": { | ||
"import": "./esm/date/is_valid_date.js", | ||
@@ -131,3 +137,3 @@ "require": "./script/date/is_valid_date.js", | ||
}, | ||
"./is_array": { | ||
"./is_array.js": { | ||
"import": "./esm/is_array.js", | ||
@@ -137,3 +143,3 @@ "require": "./script/is_array.js", | ||
}, | ||
"./is_async_iterable": { | ||
"./is_async_iterable.js": { | ||
"import": "./esm/is_async_iterable.js", | ||
@@ -143,3 +149,3 @@ "require": "./script/is_async_iterable.js", | ||
}, | ||
"./is_bigint": { | ||
"./is_bigint.js": { | ||
"import": "./esm/is_bigint.js", | ||
@@ -149,3 +155,3 @@ "require": "./script/is_bigint.js", | ||
}, | ||
"./is_boolean": { | ||
"./is_boolean.js": { | ||
"import": "./esm/is_boolean.js", | ||
@@ -155,3 +161,3 @@ "require": "./script/is_boolean.js", | ||
}, | ||
"./is_date": { | ||
"./is_date.js": { | ||
"import": "./esm/is_date.js", | ||
@@ -161,3 +167,3 @@ "require": "./script/is_date.js", | ||
}, | ||
"./is_error": { | ||
"./is_error.js": { | ||
"import": "./esm/is_error.js", | ||
@@ -167,3 +173,3 @@ "require": "./script/is_error.js", | ||
}, | ||
"./is_function": { | ||
"./is_function.js": { | ||
"import": "./esm/is_function.js", | ||
@@ -173,3 +179,3 @@ "require": "./script/is_function.js", | ||
}, | ||
"./is_iterable": { | ||
"./is_iterable.js": { | ||
"import": "./esm/is_iterable.js", | ||
@@ -179,3 +185,8 @@ "require": "./script/is_iterable.js", | ||
}, | ||
"./is_null": { | ||
"./is_non_nullable.js": { | ||
"import": "./esm/is_non_nullable.js", | ||
"require": "./script/is_non_nullable.js", | ||
"types": "./types/is_non_nullable.d.ts" | ||
}, | ||
"./is_null.js": { | ||
"import": "./esm/is_null.js", | ||
@@ -185,3 +196,3 @@ "require": "./script/is_null.js", | ||
}, | ||
"./is_nullable": { | ||
"./is_nullable.js": { | ||
"import": "./esm/is_nullable.js", | ||
@@ -191,3 +202,3 @@ "require": "./script/is_nullable.js", | ||
}, | ||
"./is_number": { | ||
"./is_number.js": { | ||
"import": "./esm/is_number.js", | ||
@@ -197,3 +208,3 @@ "require": "./script/is_number.js", | ||
}, | ||
"./is_object": { | ||
"./is_object.js": { | ||
"import": "./esm/is_object.js", | ||
@@ -203,3 +214,3 @@ "require": "./script/is_object.js", | ||
}, | ||
"./is_primitive": { | ||
"./is_primitive.js": { | ||
"import": "./esm/is_primitive.js", | ||
@@ -209,3 +220,3 @@ "require": "./script/is_primitive.js", | ||
}, | ||
"./is_promise": { | ||
"./is_promise.js": { | ||
"import": "./esm/is_promise.js", | ||
@@ -215,3 +226,3 @@ "require": "./script/is_promise.js", | ||
}, | ||
"./is_reg_exp": { | ||
"./is_reg_exp.js": { | ||
"import": "./esm/is_reg_exp.js", | ||
@@ -221,3 +232,3 @@ "require": "./script/is_reg_exp.js", | ||
}, | ||
"./is_string": { | ||
"./is_string.js": { | ||
"import": "./esm/is_string.js", | ||
@@ -227,3 +238,3 @@ "require": "./script/is_string.js", | ||
}, | ||
"./is_symbol": { | ||
"./is_symbol.js": { | ||
"import": "./esm/is_symbol.js", | ||
@@ -233,3 +244,3 @@ "require": "./script/is_symbol.js", | ||
}, | ||
"./is_undefined": { | ||
"./is_undefined.js": { | ||
"import": "./esm/is_undefined.js", | ||
@@ -239,3 +250,3 @@ "require": "./script/is_undefined.js", | ||
}, | ||
"./iterable/is_empty": { | ||
"./iterable/is_empty.js": { | ||
"import": "./esm/iterable/is_empty.js", | ||
@@ -245,3 +256,3 @@ "require": "./script/iterable/is_empty.js", | ||
}, | ||
"./iterable/is_not_empty": { | ||
"./iterable/is_not_empty.js": { | ||
"import": "./esm/iterable/is_not_empty.js", | ||
@@ -251,3 +262,3 @@ "require": "./script/iterable/is_not_empty.js", | ||
}, | ||
"./iterable/is_single": { | ||
"./iterable/is_single.js": { | ||
"import": "./esm/iterable/is_single.js", | ||
@@ -257,3 +268,3 @@ "require": "./script/iterable/is_single.js", | ||
}, | ||
"./number/is_even": { | ||
"./number/is_even.js": { | ||
"import": "./esm/number/is_even.js", | ||
@@ -263,3 +274,3 @@ "require": "./script/number/is_even.js", | ||
}, | ||
"./number/is_negative_number": { | ||
"./number/is_negative_number.js": { | ||
"import": "./esm/number/is_negative_number.js", | ||
@@ -269,3 +280,3 @@ "require": "./script/number/is_negative_number.js", | ||
}, | ||
"./number/is_non_negative_integer": { | ||
"./number/is_non_negative_integer.js": { | ||
"import": "./esm/number/is_non_negative_integer.js", | ||
@@ -275,3 +286,3 @@ "require": "./script/number/is_non_negative_integer.js", | ||
}, | ||
"./number/is_non_negative_number": { | ||
"./number/is_non_negative_number.js": { | ||
"import": "./esm/number/is_non_negative_number.js", | ||
@@ -281,3 +292,3 @@ "require": "./script/number/is_non_negative_number.js", | ||
}, | ||
"./number/is_non_positive_number": { | ||
"./number/is_non_positive_number.js": { | ||
"import": "./esm/number/is_non_positive_number.js", | ||
@@ -287,3 +298,3 @@ "require": "./script/number/is_non_positive_number.js", | ||
}, | ||
"./number/is_odd": { | ||
"./number/is_odd.js": { | ||
"import": "./esm/number/is_odd.js", | ||
@@ -293,8 +304,13 @@ "require": "./script/number/is_odd.js", | ||
}, | ||
"./number/is_positive_number": { | ||
"./number/is_positive_number.js": { | ||
"import": "./esm/number/is_positive_number.js", | ||
"require": "./script/number/is_positive_number.js", | ||
"types": "./types/number/is_positive_number.d.ts" | ||
}, | ||
"./number/is_unit_interval.js": { | ||
"import": "./esm/number/is_unit_interval.js", | ||
"require": "./script/number/is_unit_interval.js", | ||
"types": "./types/number/is_unit_interval.d.ts" | ||
} | ||
} | ||
} |
@@ -268,2 +268,16 @@ # isx | ||
## isNonNullable | ||
[![badge](https://deno.bundlejs.com/?q=https://deno.land/x/isx/is_non_nullable.ts&badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fisx%2Fis_non_nullable.ts) | ||
Whether the input is `NonNullable` or not. | ||
```ts | ||
import { isNonNullable } from "https://deno.land/x/isx@$VERSION/is_non_nullable.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
assertEquals(isNonNullable(""), true); | ||
assertEquals(isNonNullable(null), false); | ||
assertEquals(isNonNullable(undefined), false); | ||
``` | ||
## isAsyncIterable | ||
@@ -402,2 +416,17 @@ | ||
### isUnitInterval | ||
[![badge](https://deno.bundlejs.com/?q=https://deno.land/x/isx/number/is_unit_interval.ts&badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fisx%2Fnumber%2Fis_unit_interval.ts) | ||
Whether the input is unit interval or not. The unit interval refers to the | ||
interval between 0 and 1 on the real number line. | ||
```ts | ||
import { isUnitInterval } from "https://deno.land/x/isx@$VERSION/number/is_unit_interval.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
assertEquals(isUnitInterval(0), true); | ||
assertEquals(isUnitInterval(1.0), true); | ||
assertEquals(isUnitInterval(-1), false); | ||
``` | ||
## Iterable subtypes | ||
@@ -404,0 +433,0 @@ |
@@ -6,4 +6,2 @@ "use strict"; | ||
exports.isOdd = void 0; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
/** Whether the input is odd or not. | ||
@@ -10,0 +8,0 @@ * @param input - Any `number`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81675
98
1478
529
1