JavaScript Ninja - Easy Unicode Emoji Generator 😁🌠🐬

Posted at






last thing- bidi chars, can mess with your cursor direction when you are copy&&paste'ing around,
the following will delete (no regex!!) each of the "OFFICIAL" Unicode-bidi chars, if any.

(function(){
  //browse about:blank first, then open up the console and paste the code :)
  var a = [], i;
  
  for(i=0; i<30000; i+=1) 
    a.push(String.fromCharCode(i));

  a = a.join(" ").replace("\\u2066","").replace("\\u2067","").replace("\\u2068","").replace("\\u2069","").replace("\\u200E","").replace("\\u200F","").replace("\\u061C","").replace("\\u202A","").replace("\\u202B","").replace("\\u202C","").replace("\\u202D","").replace("\\u202E","");
  
  document.body.style.display="none";
  document.body.innerHTML = a;
  setTimeout(function(){
    document.body.style.display="block";
  },10);
}());


until 65533 (0XFFFD) you can use single value in .fromCharCode(...),
afterwards it is the world of surrogate-pairs :)
icompile.eladkarako.com_unicode_javascript_5