Files
30-seconds-of-code/test/indentString/indentString.js
Angelos Chalaris 28e84d483c Add indentString
2018-09-24 22:14:27 +03:00

4 lines
126 B
JavaScript

const indentString = (str, count, indent = ' ') =>
str.replace(/^/mg, indent.repeat(count));
module.exports = indentString;