You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
630 B
41 lines
630 B
# is-alphanumeric [](https://travis-ci.org/arthurvr/is-alphanumeric)
|
|
|
|
> Check if a string only contains alphanumeric characters
|
|
|
|
|
|
## Install
|
|
|
|
```
|
|
$ npm install --save is-alphanumeric
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
var isAlphanumeric = require('is-alphanumeric');
|
|
|
|
isAlphanumeric('unicorns');
|
|
//=> true
|
|
|
|
isAlphanumeric('55');
|
|
//=> true
|
|
|
|
isAlphanumeric('ABC');
|
|
//=> true
|
|
|
|
isAlphanumeric('*unicorns');
|
|
//=> false
|
|
|
|
isAlphanumeric('{unicorns}');
|
|
//=> false
|
|
|
|
isAlphanumeric(' ');
|
|
//=> false
|
|
```
|
|
|
|
|
|
## License
|
|
|
|
MIT © [Arthur Verschaeve](http://arthurverschaeve.be)
|