peb
Version:
Peb.js makes JS easier
21 lines (20 loc) • 926 B
Markdown
# Function `isdigit()`
**The last updated version of this function**: *3.0.0-pre.3*
## Browser Support
| <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/chrome.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/firefox.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/safari.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/opera.svg" width="30" /> | <img src="https://cdn.jsdelivr.net/gh/TechPot-Studio/svg-gallery/edge.svg" width="30" /> |
| :---: | :---: | :---: | :---: | :---: |
| Yes | Yes | Yes | Yes | Yes |
## Usage
```javascript
peb.isdigit(obj)
```
Return boolean of string or number is digit
### *Example*
```javascript
peb.isdigit(123); // true
peb.isdigit(1.23); // true
peb.isdigit(.123); // true
peb.isdigit(1.20); // true
peb.isdigit(".5"); // true
peb.isdigit("#1"); // false
```