indent-string
Advanced tools
Comparing version 3.0.0 to 3.1.0
'use strict'; | ||
const repeating = require('repeating'); | ||
module.exports = (str, count, indent) => { | ||
@@ -24,5 +22,3 @@ indent = indent === undefined ? ' ' : indent; | ||
indent = count > 1 ? repeating(count, indent) : indent; | ||
return str.replace(/^(?!\s*$)/mg, indent); | ||
return str.replace(/^(?!\s*$)/mg, indent.repeat(count)); | ||
}; |
{ | ||
"name": "indent-string", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Indent each line in a string", | ||
@@ -30,12 +30,6 @@ "license": "MIT", | ||
], | ||
"dependencies": { | ||
"repeating": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
} |
0
3369
18
- Removedrepeating@^3.0.0
- Removedrepeating@3.0.0(transitive)