Add indentString

This commit is contained in:
Angelos Chalaris
2018-09-24 22:14:27 +03:00
parent 1fb506d6e4
commit eb12a93d85
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,3 @@
const indentString = (str, count, indent = ' ') =>
str.replace(/^/mg, indent.repeat(count));
module.exports = indentString;