is-alphanumeric
Check if a string only contains alphanumeric characters
Install
$ npm install --save is-alphanumeric
Usage
const 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