Skip to content

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

License

Notifications You must be signed in to change notification settings

Rich-Harris/rollup-plugin-ascii

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-ascii

Rewrite JavaScript to escape any non-ASCII characters in string literals. For example, the following input:

console.log("Ich ♥ Bücher");

Becomes the following output:

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%