GitHub 6248★

Replace all tab characters with spaces

JavaScript version

const replace = (str, numSpaces = 4) => str.replaceAll('\t', ' '.repeat(numSpaces));

TypeScript version

const replace = (str: string, numSpaces = 4): string => str.replaceAll('\t', ' '.repeat(numSpaces));
Follow me on and to get more useful contents.