Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 2 months ago
JSON representation

Rewrite JavaScript to escape any non-ASCII characters in string literals.

Awesome Lists containing this project

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.