UNPKG
redent
Version:
latest (4.0.0)
4.0.0
3.0.0
2.0.0
1.0.0
Strip redundant indentation and indent the string
github.com/sindresorhus/redent
sindresorhus/redent
redent
/
index.js
7 lines
(5 loc)
•
210 B
JavaScript
View Raw
1
2
3
4
5
6
7
import
stripIndent
from
'strip-indent'
;
import
indentString
from
'indent-string'
;
export
default
function
redent
(
string
, count =
0
, options = {}
) {
return
indentString
(
stripIndent
(
string
), count, options); }