Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
Created April 29, 2015 03:08
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 JavaScript-Packer/92d8394d8220f23459f2 to your computer and use it in GitHub Desktop.
Save JavaScript-Packer/92d8394d8220f23459f2 to your computer and use it in GitHub Desktop.
Get your characters converted to an array (comma delimited) of codepoints
function codepoints(Δ) {
return Δ.replace(/./g, function(Δ) {
return Δ.charCodeAt(0) + " ";
}).trim().replace(/ /g, ",");
}
alert(codepoints("JavaScript Packer"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment