Skip to content

Instantly share code, notes, and snippets.

@eligundry
Created February 19, 2017 00:07
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 eligundry/d55e67912b9dfafc790c9781298e468d to your computer and use it in GitHub Desktop.
Save eligundry/d55e67912b9dfafc790c9781298e468d to your computer and use it in GitHub Desktop.
JS Unicode Splay
unicode_str = 'πŸ€€πŸ€πŸ€‚πŸ€ƒπŸ€„πŸ€…πŸ€†πŸ€‡πŸ€ˆπŸ€‰πŸ€ŠπŸ€‹πŸ€ŒπŸ€πŸ€ŽπŸ€πŸ€πŸ€‘πŸ€’πŸ€“πŸ€”πŸ€•πŸ€–πŸ€—πŸ€˜πŸ€™πŸ€šπŸ€›πŸ€œπŸ€πŸ€žπŸ€ŸπŸ€ πŸ€‘πŸ€’'
splat = [...unicode_str];
'use strict';
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
unicode_str = 'πŸ€€πŸ€πŸ€‚πŸ€ƒπŸ€„πŸ€…πŸ€†πŸ€‡πŸ€ˆπŸ€‰πŸ€ŠπŸ€‹πŸ€ŒπŸ€πŸ€ŽπŸ€πŸ€πŸ€‘πŸ€’πŸ€“πŸ€”πŸ€•πŸ€–πŸ€—πŸ€˜πŸ€™πŸ€šπŸ€›πŸ€œπŸ€πŸ€žπŸ€ŸπŸ€ πŸ€‘πŸ€’';
splat = [].concat(_toConsumableArray(unicode_str));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment