$ npm install is-alphanumeric
Check if a string only contains alphanumeric characters
$ npm install --save is-alphanumeric
var isAlphanumeric = require('is-alphanumeric');
isAlphanumeric('unicorns');
//=> true
isAlphanumeric('55');
//=> true
isAlphanumeric('ABC');
//=> true
isAlphanumeric('*unicorns');
//=> false
isAlphanumeric('{unicorns}');
//=> false
isAlphanumeric(' ');
//=> false
MIT © Arthur Verschaeve
© 2010 - cnpmjs.org x YWFE | Home | YWFE