is-ascii

v1.0.0
Test if a string is 100% ascii
ascii string utf8

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.

npm i is-ascii

Metadata

  • MIT
  • Whatever
  • Ari Porad
  • released 1/6/2016

Downloads

Maintainers