1.0.0 • Published 3 years ago
@steelbrain/entities-to-unicode v1.0.0
Entities to Unicode
Encode HTML Entities to Unicode characters
API
// API
export default function entitiesToUnicode(input: string): string;
Usage
This package was inspired from Handlbars.Utils.escapeExpression, but instead of converting entities to non-human friendly characters, for example from &
to &
, it converts them to their closest unicode characters.
This is helpful when sending emails with both cleartext and HTML versions, as you can re-use your variables across both.
NOTE: Do not encode URLs with unicode, they will break.
License
This project is licensed under the terms of MIT License. See the License file for more info.
1.0.0
3 years ago