Add indentString

This commit is contained in:
Angelos Chalaris
2018-09-24 22:14:27 +03:00
parent 680b3a3ac0
commit 28e84d483c
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;