https://github.com/mathiasbynens/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.
https://github.com/mathiasbynens/is-ascii-safe
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/mathiasbynens/is-ascii-safe
- Owner: mathiasbynens
- License: apache-2.0
- Created: 2018-08-31T13:21:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-31T14:15:02.000Z (almost 7 years ago)
- Last Synced: 2025-03-28T22:24:46.681Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-ascii-safe [](https://travis-ci.com/mathiasbynens/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](https://www.npmjs.com/):
```bash
npm install is-ascii-safe --save
```## Usage
```js
const isAsciiSafe = require('is-ascii-safe');isAsciiSafe('abc');
// → true
isAsciiSafe('a𝌆b');
// → false
isAsciiSafe('Iñtërnâtiônàlizætiøn☃💩');
// → false
```## Author
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](https://mathiasbynens.be/) |