Open
Description
Hi,
I was not able to change a default value from a minified javascript library, output was like :
{autoScrollSize:!0,autoUpdate:!0,debug:!1,disableBodyScroll:!1,duration:200,ignoreMobile:!1,ignoreOverlay:!1,scrollStep:30,showArrows:!1,stepScrolling:!0,scrollx:null,scrolly:null,onDestroy:null,onInit:null,onScroll:null,onUpdate:null}
and I wanted to change the default value of ignoreOverlay
to !0
with that call :
.pipe(replace( {regex:'ignoreOverlay:([!01])', replace:'!0'} ))
So I'm not really understanding why you use 2 different RegExp()
constructor based on the value returned by isWord()
but using the RegExp()
with boundary word (\b) was in fault. So I changed isWord()
accordingly :
function isWord(str) {
if ((str.indexOf(' ') === -1) &&
(str.indexOf('.') === -1) &&
(str.indexOf(',') === -1) &&
(str.indexOf('=') === -1) &&
(str.indexOf(';') === -1) &&
(str.indexOf(':') === -1)) { //<-- Added colon
return true;
}
return false;
}
and now it works but I'm not sure if it's the good solution.
Metadata
Metadata
Assignees
Labels
No labels