Sign in
apache
/
nifi-fds
/
gh-pages
/
.
/
node_modules
/
stylelint
/
node_modules
/
strip-indent
/
index.js
blob: 7ba3b15b3e60f64a739d049a05fdd1a7df0546d5 [
file
] [
log
] [
blame
]
'use strict'
;
const
minIndent
=
require
(
'min-indent'
);
module
.
exports
=
string
=>
{
const
indent
=
minIndent
(
string
);
if
(
indent
===
0
)
{
return
string
;
}
const
regex
=
new
RegExp
(`^[
\\t
]{
$
{
indent
}}`,
'gm'
);
return
string
.
replace
(
regex
,
''
);
};