Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbostock/rollup-plugin-ascii
Rewrite JavaScript to escape any non-ASCII characters in string literals.
https://github.com/mbostock/rollup-plugin-ascii
Last synced: about 1 month ago
JSON representation
Rewrite JavaScript to escape any non-ASCII characters in string literals.
- Host: GitHub
- URL: https://github.com/mbostock/rollup-plugin-ascii
- Owner: mbostock
- License: bsd-3-clause
- Created: 2016-06-09T19:45:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-13T20:37:35.000Z (almost 5 years ago)
- Last Synced: 2024-05-15T00:49:50.430Z (7 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - ascii - ASCII characters as string literals. (Plugins / Text Replacement)
README
# rollup-plugin-ascii
Rewrite JavaScript to escape any non-ASCII characters in string literals. For example, the following input:
```js
console.log("Ich ♥ Bücher");
```Becomes the following output:
```js
console.log("Ich \u2665 B\xFCcher");
```Only string literals are escaped! If you want to escape Unicode symbols, too, you’ll need something like UglifyJS2.