is-ascii-safe
v1.0.0
Published
Check if a given string is ASCII-safe, i.e. consists of ASCII characters (U+0000 to U+007F) only.
Downloads
74
Readme
is-ascii-safe
is-ascii-safe determines whether a given string is ASCII-safe, i.e. if it consists of ASCII characters (U+0000 to U+007F) only.
Installation
To use is-ascii-safe programmatically, install it as a dependency via npm:
npm install is-ascii-safe --save
Usage
const isAsciiSafe = require('is-ascii-safe');
isAsciiSafe('abc');
// → true
isAsciiSafe('a𝌆b');
// → false
isAsciiSafe('Iñtërnâtiônàlizætiøn☃💩');
// → false
Author
| | |---| | Mathias Bynens |