Skip to content

Instantly share code, notes, and snippets.



Last active Mar 20, 2020
What would you like to do?
An ES6 function for fixing Orphans
export function adopt(str) {
return str.replace(/\s([^\s<]+)\s*$/g, '\u00A0$1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment