-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(numeric): improve acceptable type to expand bigint
- Loading branch information
1 parent
893b1eb
commit 62b0245
Showing
5 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,21 +72,6 @@ export const makeOptions = (version: string): BuildOptions => ({ | |
version: "1.3.1", | ||
subPath: "is_nullable.js", | ||
}, | ||
"https://deno.land/x/[email protected]/number/is_non_positive_number.ts": { | ||
name: "@miyauci/isx", | ||
version: "1.3.1", | ||
subPath: "number/is_non_positive_number.js", | ||
}, | ||
"https://deno.land/x/[email protected]/number/is_negative_number.ts": { | ||
name: "@miyauci/isx", | ||
version: "1.3.1", | ||
subPath: "number/is_negative_number.js", | ||
}, | ||
"https://deno.land/x/[email protected]/number/is_non_negative_number.ts": { | ||
name: "@miyauci/isx", | ||
version: "1.3.1", | ||
subPath: "number/is_non_negative_number.js", | ||
}, | ||
"https://deno.land/x/[email protected]/date/is_valid_date.ts": { | ||
name: "@miyauci/isx", | ||
version: "1.3.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,6 @@ export { isSingle } from "https://deno.land/x/[email protected]/iterable/is_single.ts"; | |
export { isNullable } from "https://deno.land/x/[email protected]/is_nullable.ts"; | ||
export { isString } from "https://deno.land/x/[email protected]/is_string.ts"; | ||
export { isBigint } from "https://deno.land/x/[email protected]/is_bigint.ts"; | ||
export { isNegativeNumber } from "https://deno.land/x/[email protected]/number/is_negative_number.ts"; | ||
export { isNonPositiveNumber } from "https://deno.land/x/[email protected]/number/is_non_positive_number.ts"; | ||
export { isNonNegativeNumber } from "https://deno.land/x/[email protected]/number/is_non_negative_number.ts"; | ||
export { isValidDate } from "https://deno.land/x/[email protected]/date/is_valid_date.ts"; | ||
export { filterKeys } from "https://deno.land/[email protected]/collections/filter_keys.ts"; | ||
export { maxBy } from "https://deno.land/[email protected]/collections/max_by.ts"; | ||
|
@@ -22,6 +19,23 @@ export function isPositiveNumber(input: number | bigint): boolean { | |
return input > 0; | ||
} | ||
|
||
/** Whether the input is negative number or not. | ||
* @param input - Any numeric. | ||
*/ | ||
export function isNegativeNumber(input: number | bigint): boolean { | ||
return input < 0; | ||
} | ||
|
||
/** Whether the input is non-positive number or not. */ | ||
export function isNonPositiveNumber(input: number | bigint): boolean { | ||
return isNegativeNumber(input) || !input; | ||
} | ||
|
||
/** Whether the input is non-negative number or not. */ | ||
export function isNonNegativeNumber(input: number | bigint): boolean { | ||
return isPositiveNumber(input) || !input; | ||
} | ||
|
||
/** Constructor type. */ | ||
// deno-lint-ignore no-explicit-any | ||
export type Constructor = abstract new (...args: any) => any; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters