Skip to content

Instantly share code, notes, and snippets.

@gnimmelf
Created November 5, 2018 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnimmelf/9db1626c756d667b8593435e0a72bd7c to your computer and use it in GitHub Desktop.
Save gnimmelf/9db1626c756d667b8593435e0a72bd7c to your computer and use it in GitHub Desktop.
entityCodePoint to string
import characterEntities from 'character-entities-html4';
export const entityCodePoints = new Proxy(characterEntities, {
// http://xahlee.info/js/js_unicode_code_point.html
get: function(target, prop) {
console.log(target, prop)
return String.fromCodePoint(target[prop].codePointAt(0));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment