is-ascii

Test if a string is 100% ascii


Keywords
ascii, string, utf8
License
MIT
Install
npm install is-ascii@1.0.0

Documentation

isAscii


Test if a string is 100% ascii.

npm version Build Status License: MIT


Why

I needed to see if a string was 100% ascii.


Usage

import isAscii from 'is-ascii';

isAscii('foo bar baz !?!!!!???? @#$%^&*(){}[]\|-_+=`~'); // true
isAscii('💩💩💩‽‽‽'); // false

License

MIT: http://ariporad.mit-license.org.