Files
30-seconds-of-code/test/indentString/indentString.js
2018-09-27 20:14:50 +00:00

3 lines
124 B
JavaScript

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