const prependNumbers = (str) =>str.split(/\r?\n/).map((line, i) => `${(i + 1).toString().padStart(2, ' ')} ${line}`).join('\n');
const prependNumbers = (str: string): string =>str.split(/\r?\n/).map((line, i) => `${(i + 1).toString().padStart(2, ' ')} ${line}`).join('\n');
prependNumbers(`onetwothreefour`);/* Output *//*1 one2 two3 three4 four*/