Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajimae/isnumber
a deno module to check if a given value or variable is a number
https://github.com/ajimae/isnumber
Last synced: 19 days ago
JSON representation
a deno module to check if a given value or variable is a number
- Host: GitHub
- URL: https://github.com/ajimae/isnumber
- Owner: ajimae
- License: mit
- Created: 2020-06-16T15:00:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-16T15:22:07.000Z (over 4 years ago)
- Last Synced: 2024-10-25T10:33:35.032Z (26 days ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🦕 Deno isNumber
## Usage
```typescript
import { isNumber } from "https://raw.githubusercontent.com/ajimae/isNumber/master/mod.ts";var numberOne = 5;
const checkOne = isNumber(numberOne);
console.log(checkOne); // truevar numberTwo = '5';
const checkTwo = isNumber(numberTwo);
console.log(checkTwo); // false
```## Test
```bash
# unit tests - first clone this repo to your local machine the run
deno test
```## Resources
JavaScript
- [JavaScript isNaN](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/isNaN)
- [JavaScript typof](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof)Deno
- [Deno Website](https://deno.land)
- [Deno documentation](https://doc.deno.land/https/github.com/denoland/deno/releases/latest/download/lib.deno.d.ts)
- [Deno Standard Library](https://deno.land/std)