is-ascii

Test if a string is 100% ascii

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
is-ascii
301.0.08 years ago8 years agoMinified + gzip package size for is-ascii in KB

Readme

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.