Skip to content

Instantly share code, notes, and snippets.

@Thiruppathi
Last active February 18, 2019 15:13
Show Gist options
  • Save Thiruppathi/16156951e7f227813a2a389826cb8851 to your computer and use it in GitHub Desktop.
Save Thiruppathi/16156951e7f227813a2a389826cb8851 to your computer and use it in GitHub Desktop.
function a11yMyName(str) {
return str[0] + str.slice(1, str.length-1).length + str[str.length-1] || '';
}
a11yMyName('internationalisation'); // i18n
a11yMyName('accessibility'); // a11y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment