@miyauci/isx
Advanced tools
Comparing version 1.4.0 to 1.5.0-beta.1
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is valid `Date` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is array or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -20,2 +20,4 @@ import { isFunction } from "./is_function.js"; | ||
* ``` | ||
* | ||
* @deprecated Use {@link object/is_async_iterable} instead. | ||
*/ | ||
@@ -22,0 +24,0 @@ export function isAsyncIterable(input) { |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `bigint` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `boolean` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `Date` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `Error` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `Function` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -13,2 +13,4 @@ import { isFunction } from "./is_function.js"; | ||
* ``` | ||
* | ||
* @deprecated Use {@link object/is_iterable} instead. | ||
*/ | ||
@@ -15,0 +17,0 @@ export function isIterable(input) { |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isNullable } from "./is_nullable.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `null` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isNull } from "./is_null.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `number` or not. |
@@ -1,4 +0,3 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
import { isNull } from "./is_null.js"; | ||
/** Whether the input is `object` or not. | ||
@@ -15,3 +14,4 @@ * @param input - Any input. | ||
export function isObject(input) { | ||
return typeof input === "object" && !isNull(input); | ||
const type = typeof input; | ||
return (type === "object" && !!input) || type === "function"; | ||
} |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isObject } from "./is_object.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `Promise` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `RegExp` of not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `string` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `symbol` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is `undefined` or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ export function isEmpty(input) { |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ export function isNotEmpty(input) { |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ export function isSingle(input) { |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is even or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is negative number or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isNonNegativeNumber } from "./is_non_negative_number.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isPositiveNumber } from "./is_positive_number.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isNegativeNumber } from "./is_negative_number.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is odd or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ import { isPositiveNumber } from "./is_positive_number.js"; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is positive number or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is unit interval or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is negative number or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is non-negative number or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is non-positive number or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is positive number or not. |
@@ -1,2 +0,2 @@ | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -3,0 +3,0 @@ /** Whether the input is unit interval or not. |
127
package.json
{ | ||
"name": "@miyauci/isx", | ||
"version": "1.4.0", | ||
"version": "1.5.0-beta.1", | ||
"description": "Collection of validation functions for JavaScript data", | ||
@@ -144,2 +144,8 @@ "license": "MIT", | ||
"types/numeric/is_unit_interval.d.ts" | ||
], | ||
"object/is_async_iterable.js": [ | ||
"types/object/is_async_iterable.d.ts" | ||
], | ||
"object/is_iterable.js": [ | ||
"types/object/is_iterable.d.ts" | ||
] | ||
@@ -151,186 +157,157 @@ } | ||
"import": "./esm/date/is_valid_date.js", | ||
"require": "./script/date/is_valid_date.js", | ||
"types": "./types/date/is_valid_date.d.ts" | ||
"require": "./script/date/is_valid_date.js" | ||
}, | ||
"./is_array.js": { | ||
"import": "./esm/is_array.js", | ||
"require": "./script/is_array.js", | ||
"types": "./types/is_array.d.ts" | ||
"require": "./script/is_array.js" | ||
}, | ||
"./is_async_iterable.js": { | ||
"import": "./esm/is_async_iterable.js", | ||
"require": "./script/is_async_iterable.js", | ||
"types": "./types/is_async_iterable.d.ts" | ||
"require": "./script/is_async_iterable.js" | ||
}, | ||
"./is_bigint.js": { | ||
"import": "./esm/is_bigint.js", | ||
"require": "./script/is_bigint.js", | ||
"types": "./types/is_bigint.d.ts" | ||
"require": "./script/is_bigint.js" | ||
}, | ||
"./is_boolean.js": { | ||
"import": "./esm/is_boolean.js", | ||
"require": "./script/is_boolean.js", | ||
"types": "./types/is_boolean.d.ts" | ||
"require": "./script/is_boolean.js" | ||
}, | ||
"./is_date.js": { | ||
"import": "./esm/is_date.js", | ||
"require": "./script/is_date.js", | ||
"types": "./types/is_date.d.ts" | ||
"require": "./script/is_date.js" | ||
}, | ||
"./is_error.js": { | ||
"import": "./esm/is_error.js", | ||
"require": "./script/is_error.js", | ||
"types": "./types/is_error.d.ts" | ||
"require": "./script/is_error.js" | ||
}, | ||
"./is_function.js": { | ||
"import": "./esm/is_function.js", | ||
"require": "./script/is_function.js", | ||
"types": "./types/is_function.d.ts" | ||
"require": "./script/is_function.js" | ||
}, | ||
"./is_iterable.js": { | ||
"import": "./esm/is_iterable.js", | ||
"require": "./script/is_iterable.js", | ||
"types": "./types/is_iterable.d.ts" | ||
"require": "./script/is_iterable.js" | ||
}, | ||
"./is_non_nullable.js": { | ||
"import": "./esm/is_non_nullable.js", | ||
"require": "./script/is_non_nullable.js", | ||
"types": "./types/is_non_nullable.d.ts" | ||
"require": "./script/is_non_nullable.js" | ||
}, | ||
"./is_null.js": { | ||
"import": "./esm/is_null.js", | ||
"require": "./script/is_null.js", | ||
"types": "./types/is_null.d.ts" | ||
"require": "./script/is_null.js" | ||
}, | ||
"./is_nullable.js": { | ||
"import": "./esm/is_nullable.js", | ||
"require": "./script/is_nullable.js", | ||
"types": "./types/is_nullable.d.ts" | ||
"require": "./script/is_nullable.js" | ||
}, | ||
"./is_number.js": { | ||
"import": "./esm/is_number.js", | ||
"require": "./script/is_number.js", | ||
"types": "./types/is_number.d.ts" | ||
"require": "./script/is_number.js" | ||
}, | ||
"./is_object.js": { | ||
"import": "./esm/is_object.js", | ||
"require": "./script/is_object.js", | ||
"types": "./types/is_object.d.ts" | ||
"require": "./script/is_object.js" | ||
}, | ||
"./is_primitive.js": { | ||
"import": "./esm/is_primitive.js", | ||
"require": "./script/is_primitive.js", | ||
"types": "./types/is_primitive.d.ts" | ||
"require": "./script/is_primitive.js" | ||
}, | ||
"./is_promise.js": { | ||
"import": "./esm/is_promise.js", | ||
"require": "./script/is_promise.js", | ||
"types": "./types/is_promise.d.ts" | ||
"require": "./script/is_promise.js" | ||
}, | ||
"./is_reg_exp.js": { | ||
"import": "./esm/is_reg_exp.js", | ||
"require": "./script/is_reg_exp.js", | ||
"types": "./types/is_reg_exp.d.ts" | ||
"require": "./script/is_reg_exp.js" | ||
}, | ||
"./is_string.js": { | ||
"import": "./esm/is_string.js", | ||
"require": "./script/is_string.js", | ||
"types": "./types/is_string.d.ts" | ||
"require": "./script/is_string.js" | ||
}, | ||
"./is_symbol.js": { | ||
"import": "./esm/is_symbol.js", | ||
"require": "./script/is_symbol.js", | ||
"types": "./types/is_symbol.d.ts" | ||
"require": "./script/is_symbol.js" | ||
}, | ||
"./is_undefined.js": { | ||
"import": "./esm/is_undefined.js", | ||
"require": "./script/is_undefined.js", | ||
"types": "./types/is_undefined.d.ts" | ||
"require": "./script/is_undefined.js" | ||
}, | ||
"./iterable/is_empty.js": { | ||
"import": "./esm/iterable/is_empty.js", | ||
"require": "./script/iterable/is_empty.js", | ||
"types": "./types/iterable/is_empty.d.ts" | ||
"require": "./script/iterable/is_empty.js" | ||
}, | ||
"./iterable/is_not_empty.js": { | ||
"import": "./esm/iterable/is_not_empty.js", | ||
"require": "./script/iterable/is_not_empty.js", | ||
"types": "./types/iterable/is_not_empty.d.ts" | ||
"require": "./script/iterable/is_not_empty.js" | ||
}, | ||
"./iterable/is_single.js": { | ||
"import": "./esm/iterable/is_single.js", | ||
"require": "./script/iterable/is_single.js", | ||
"types": "./types/iterable/is_single.d.ts" | ||
"require": "./script/iterable/is_single.js" | ||
}, | ||
"./number/is_even.js": { | ||
"import": "./esm/number/is_even.js", | ||
"require": "./script/number/is_even.js", | ||
"types": "./types/number/is_even.d.ts" | ||
"require": "./script/number/is_even.js" | ||
}, | ||
"./number/is_negative_number.js": { | ||
"import": "./esm/number/is_negative_number.js", | ||
"require": "./script/number/is_negative_number.js", | ||
"types": "./types/number/is_negative_number.d.ts" | ||
"require": "./script/number/is_negative_number.js" | ||
}, | ||
"./number/is_non_negative_integer.js": { | ||
"import": "./esm/number/is_non_negative_integer.js", | ||
"require": "./script/number/is_non_negative_integer.js", | ||
"types": "./types/number/is_non_negative_integer.d.ts" | ||
"require": "./script/number/is_non_negative_integer.js" | ||
}, | ||
"./number/is_non_negative_number.js": { | ||
"import": "./esm/number/is_non_negative_number.js", | ||
"require": "./script/number/is_non_negative_number.js", | ||
"types": "./types/number/is_non_negative_number.d.ts" | ||
"require": "./script/number/is_non_negative_number.js" | ||
}, | ||
"./number/is_non_positive_number.js": { | ||
"import": "./esm/number/is_non_positive_number.js", | ||
"require": "./script/number/is_non_positive_number.js", | ||
"types": "./types/number/is_non_positive_number.d.ts" | ||
"require": "./script/number/is_non_positive_number.js" | ||
}, | ||
"./number/is_odd.js": { | ||
"import": "./esm/number/is_odd.js", | ||
"require": "./script/number/is_odd.js", | ||
"types": "./types/number/is_odd.d.ts" | ||
"require": "./script/number/is_odd.js" | ||
}, | ||
"./number/is_positive_integer.js": { | ||
"import": "./esm/number/is_positive_integer.js", | ||
"require": "./script/number/is_positive_integer.js", | ||
"types": "./types/number/is_positive_integer.d.ts" | ||
"require": "./script/number/is_positive_integer.js" | ||
}, | ||
"./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" | ||
"require": "./script/number/is_positive_number.js" | ||
}, | ||
"./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" | ||
"require": "./script/number/is_unit_interval.js" | ||
}, | ||
"./numeric/is_negative_number.js": { | ||
"import": "./esm/numeric/is_negative_number.js", | ||
"require": "./script/numeric/is_negative_number.js", | ||
"types": "./types/numeric/is_negative_number.d.ts" | ||
"require": "./script/numeric/is_negative_number.js" | ||
}, | ||
"./numeric/is_non_negative_number.js": { | ||
"import": "./esm/numeric/is_non_negative_number.js", | ||
"require": "./script/numeric/is_non_negative_number.js", | ||
"types": "./types/numeric/is_non_negative_number.d.ts" | ||
"require": "./script/numeric/is_non_negative_number.js" | ||
}, | ||
"./numeric/is_non_positive_number.js": { | ||
"import": "./esm/numeric/is_non_positive_number.js", | ||
"require": "./script/numeric/is_non_positive_number.js", | ||
"types": "./types/numeric/is_non_positive_number.d.ts" | ||
"require": "./script/numeric/is_non_positive_number.js" | ||
}, | ||
"./numeric/is_positive_number.js": { | ||
"import": "./esm/numeric/is_positive_number.js", | ||
"require": "./script/numeric/is_positive_number.js", | ||
"types": "./types/numeric/is_positive_number.d.ts" | ||
"require": "./script/numeric/is_positive_number.js" | ||
}, | ||
"./numeric/is_unit_interval.js": { | ||
"import": "./esm/numeric/is_unit_interval.js", | ||
"require": "./script/numeric/is_unit_interval.js", | ||
"types": "./types/numeric/is_unit_interval.d.ts" | ||
"require": "./script/numeric/is_unit_interval.js" | ||
}, | ||
"./object/is_async_iterable.js": { | ||
"import": "./esm/object/is_async_iterable.js", | ||
"require": "./script/object/is_async_iterable.js" | ||
}, | ||
"./object/is_iterable.js": { | ||
"import": "./esm/object/is_iterable.js", | ||
"require": "./script/object/is_iterable.js" | ||
} | ||
} | ||
} |
@@ -255,15 +255,2 @@ # isx | ||
## isIterable | ||
[![badge](https://deno.bundlejs.com/?q=https://deno.land/x/isx/is_iterable.ts&badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fisx%2Fis_iterable.ts) | ||
Whether the input is `Iterable` or not. | ||
```ts | ||
import { isIterable } from "https://deno.land/x/isx@$VERSION/is_iterable.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
assertEquals(isIterable(""), true); | ||
assertEquals(isIterable({}), false); | ||
``` | ||
## isNonNullable | ||
@@ -283,22 +270,2 @@ | ||
## isAsyncIterable | ||
[![badge](https://deno.bundlejs.com/?q=https://deno.land/x/isx/is_async_iterable.ts&badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fisx%2Fis_async_iterable.ts) | ||
Whether the input is `AsyncIterable` or not. | ||
```ts | ||
import { isAsyncIterable } from "https://deno.land/x/isx@$VERSION/is_async_iterable.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
assertEquals( | ||
isAsyncIterable({ | ||
async *[Symbol.asyncIterator]() { | ||
yield "hello"; | ||
}, | ||
}), | ||
true, | ||
); | ||
assertEquals(isAsyncIterable(() => {}), false); | ||
``` | ||
## isRegExp | ||
@@ -450,2 +417,39 @@ | ||
## Object subtypes | ||
Validates a subtype of `object`. All validate functions must satisfy ⊂ `object`. | ||
### isAsyncIterable | ||
[![badge](https://deno.bundlejs.com/?q=https://deno.land/x/isx/object/is_async_iterable.ts&badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fisx%2Fobject%2Fis_async_iterable.ts) | ||
Whether the input is `AsyncIterable` or not. | ||
```ts | ||
import { isAsyncIterable } from "https://deno.land/x/isx@$VERSION/object/is_async_iterable.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
assertEquals( | ||
isAsyncIterable({ | ||
async *[Symbol.asyncIterator]() { | ||
yield "hello"; | ||
}, | ||
}), | ||
true, | ||
); | ||
assertEquals(isAsyncIterable({}), false); | ||
``` | ||
### isIterable | ||
[![badge](https://deno.bundlejs.com/?q=https://deno.land/x/isx/object/is_iterable.ts&badge=)](https://bundlejs.com/?q=https%3A%2F%2Fdeno.land%2Fx%2Fisx%2Fobject%2Fis_iterable.ts) | ||
Whether the input is `Iterable` or not. | ||
```ts | ||
import { isIterable } from "https://deno.land/x/isx@$VERSION/object/is_iterable.ts"; | ||
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; | ||
assertEquals(isIterable(""), true); | ||
assertEquals(isIterable({}), false); | ||
``` | ||
## Iterable subtypes | ||
@@ -547,4 +551,2 @@ | ||
Copyright © 2023-present [Tomoki Miyauchi](https://github.com/TomokiMiyauci). | ||
Released under the [MIT](./LICENSE) license | ||
[MIT](LICENSE) © 2021 Tomoki Miyauchi |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -23,2 +23,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
* ``` | ||
* | ||
* @deprecated Use {@link object/is_async_iterable} instead. | ||
*/ | ||
@@ -25,0 +27,0 @@ function isAsyncIterable(input) { |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -16,2 +16,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
* ``` | ||
* | ||
* @deprecated Use {@link object/is_iterable} instead. | ||
*/ | ||
@@ -18,0 +20,0 @@ function isIterable(input) { |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isObject = void 0; | ||
const is_null_js_1 = require("./is_null.js"); | ||
/** Whether the input is `object` or not. | ||
@@ -18,4 +17,5 @@ * @param input - Any input. | ||
function isObject(input) { | ||
return typeof input === "object" && !(0, is_null_js_1.isNull)(input); | ||
const type = typeof input; | ||
return (type === "object" && !!input) || type === "function"; | ||
} | ||
exports.isObject = isObject; |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
// Copyright 2023-latest Tomoki Miyauchi. All rights reserved. MIT license. | ||
// Copyright © 2021 Tomoki Miyauchi. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
@@ -4,0 +4,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
Sorry, the diff of this file is not supported yet
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
119949
161
2487
549
1