https://github.com/hugoalh/is-numeric-integral-es
An ECMAScript (JavaScript & TypeScript) module to determine whether the numeric is integral.
https://github.com/hugoalh/is-numeric-integral-es
ecmascript ecmascript-module es es-module esm esmodule integral is javascript js numeric ts typescript
Last synced: 3 months ago
JSON representation
An ECMAScript (JavaScript & TypeScript) module to determine whether the numeric is integral.
- Host: GitHub
- URL: https://github.com/hugoalh/is-numeric-integral-es
- Owner: hugoalh
- License: other
- Created: 2024-10-17T08:52:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-23T09:02:54.000Z (about 1 year ago)
- Last Synced: 2025-04-23T10:22:08.875Z (about 1 year ago)
- Topics: ecmascript, ecmascript-module, es, es-module, esm, esmodule, integral, is, javascript, js, numeric, ts, typescript
- Language: TypeScript
- Homepage:
- Size: 92.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Citation: CITATION.cff
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Is Numeric Integral (ES)
[**⚖️** MIT](./LICENSE.md)
[](https://github.com/hugoalh/is-numeric-integral-es)
[](https://jsr.io/@hugoalh/is-numeric-integral)
[](https://www.npmjs.com/package/@hugoalh/is-numeric-integral)
An ECMAScript module to determine whether the numeric is integral.
## 🎯 Targets
| **Runtime \\ Source** | **GitHub Raw** | **JSR** | **NPM** |
|:--|:-:|:-:|:-:|
| **[Bun](https://bun.sh/)** >= v1.1.0 | ❌ | ✔️ | ✔️ |
| **[Deno](https://deno.land/)** >= v2.1.0 | ✔️ | ✔️ | ✔️ |
| **[NodeJS](https://nodejs.org/)** >= v20.9.0 | ❌ | ✔️ | ✔️ |
## 🛡️ Runtime Permissions
This does not request any runtime permission.
## #️⃣ Sources
- GitHub Raw
```
https://raw.githubusercontent.com/hugoalh/is-numeric-integral-es/{Tag}/mod.ts
```
- JSR
```
jsr:@hugoalh/is-numeric-integral[@{Tag}]
```
- NPM
```
npm:@hugoalh/is-numeric-integral[@{Tag}]
```
> [!NOTE]
> - It is recommended to include tag for immutability.
> - These are not part of the public APIs hence should not be used:
> - Benchmark/Test file (e.g.: `example.bench.ts`, `example.test.ts`).
> - Entrypoint name or path include any underscore prefix (e.g.: `_example.ts`, `foo/_example.ts`).
> - Identifier/Namespace/Symbol include any underscore prefix (e.g.: `_example`, `Foo._example`).
## ⤵️ Entrypoints
| **Name** | **Path** | **Description** |
|:--|:--|:--|
| `.` | `./mod.ts` | Default. |
## 🧩 APIs
- ```ts
function isNumericIntegral(typeName: NumericIntegralType | NumericIntegralTypeExtend, item: bigint | number): boolean;
```
> [!NOTE]
> - For the full or prettier documentation, can visit via:
> - [Deno CLI `deno doc`](https://docs.deno.com/runtime/reference/cli/doc/)
> - [JSR](https://jsr.io/@hugoalh/is-numeric-integral)
## ✍️ Examples
- ```ts
isNumericIntegral("Byte", 9876);
//=> false
```
- ```ts
isNumericIntegral("UInt8", 256);
//=> false
```
- ```ts
isNumericIntegral("Byte", 8n);
//=> true
```