28 lines
1.2 KiB
Markdown
Executable File
28 lines
1.2 KiB
Markdown
Executable File
# is-number-like
|
|
|
|
<!-- VDOC.badges travis; standard; npm; coveralls -->
|
|
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
|
|
[](https://travis-ci.org/vigour-io/is-number-like)
|
|
[](http://standardjs.com/)
|
|
[](https://badge.fury.io/js/is-number-like)
|
|
[](https://coveralls.io/github/vigour-io/is-number-like?branch=master)
|
|
|
|
<!-- VDOC END -->
|
|
|
|
<!-- VDOC.jsdoc isNumberLike -->
|
|
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
|
|
#### var looksLikeNumber = isNumberLike(val)
|
|
|
|
Checks whether provided parameter looks like a number
|
|
- **val** (*any*) - the value to check
|
|
- **returns** (*boolean*) looksLikeNumber - `true` if `val` looks like a number, `false` otherwise
|
|
|
|
<!-- VDOC END -->
|
|
|
|
|
|
```javascript
|
|
const isNumberLike = require('is-number-like')
|
|
isNumberLike('2') // true
|
|
isNumberLike('a') // false
|
|
```
|