[d24f17c] | 1 | # is-alphanumerical
|
---|
| 2 |
|
---|
| 3 | [![Build][build-badge]][build]
|
---|
| 4 | [![Coverage][coverage-badge]][coverage]
|
---|
| 5 | [![Downloads][downloads-badge]][downloads]
|
---|
| 6 | [![Size][size-badge]][size]
|
---|
| 7 |
|
---|
| 8 | Check if a character is alphanumerical (`[a-zA-Z0-9]`).
|
---|
| 9 |
|
---|
| 10 | ## Install
|
---|
| 11 |
|
---|
| 12 | [npm][]:
|
---|
| 13 |
|
---|
| 14 | ```sh
|
---|
| 15 | npm install is-alphanumerical
|
---|
| 16 | ```
|
---|
| 17 |
|
---|
| 18 | ## Use
|
---|
| 19 |
|
---|
| 20 | ```js
|
---|
| 21 | var alphanumerical = require('is-alphanumerical')
|
---|
| 22 |
|
---|
| 23 | alphanumerical('a') // => true
|
---|
| 24 | alphanumerical('Z') // => true
|
---|
| 25 | alphanumerical('0') // => true
|
---|
| 26 | alphanumerical(' ') // => false
|
---|
| 27 | alphanumerical('💩') // => false
|
---|
| 28 | ```
|
---|
| 29 |
|
---|
| 30 | ## API
|
---|
| 31 |
|
---|
| 32 | ### `alphanumerical(character)`
|
---|
| 33 |
|
---|
| 34 | Check whether the given character code (`number`), or the character code at the
|
---|
| 35 | first position (`string`), is alphanumerical.
|
---|
| 36 |
|
---|
| 37 | ## Related
|
---|
| 38 |
|
---|
| 39 | * [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
|
---|
| 40 | * [`is-decimal`](https://github.com/wooorm/is-decimal)
|
---|
| 41 | * [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
|
---|
| 42 | * [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
|
---|
| 43 | * [`is-word-character`](https://github.com/wooorm/is-word-character)
|
---|
| 44 |
|
---|
| 45 | ## License
|
---|
| 46 |
|
---|
| 47 | [MIT][license] © [Titus Wormer][author]
|
---|
| 48 |
|
---|
| 49 | <!-- Definitions -->
|
---|
| 50 |
|
---|
| 51 | [build-badge]: https://img.shields.io/travis/wooorm/is-alphanumerical.svg
|
---|
| 52 |
|
---|
| 53 | [build]: https://travis-ci.org/wooorm/is-alphanumerical
|
---|
| 54 |
|
---|
| 55 | [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/is-alphanumerical.svg
|
---|
| 56 |
|
---|
| 57 | [coverage]: https://codecov.io/github/wooorm/is-alphanumerical
|
---|
| 58 |
|
---|
| 59 | [downloads-badge]: https://img.shields.io/npm/dm/is-alphanumerical.svg
|
---|
| 60 |
|
---|
| 61 | [downloads]: https://www.npmjs.com/package/is-alphanumerical
|
---|
| 62 |
|
---|
| 63 | [size-badge]: https://img.shields.io/bundlephobia/minzip/is-alphanumerical.svg
|
---|
| 64 |
|
---|
| 65 | [size]: https://bundlephobia.com/result?p=is-alphanumerical
|
---|
| 66 |
|
---|
| 67 | [npm]: https://docs.npmjs.com/cli/install
|
---|
| 68 |
|
---|
| 69 | [license]: license
|
---|
| 70 |
|
---|
| 71 | [author]: https://wooorm.com
|
---|