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 !0with 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.
Hi,
I was not able to change a default value from a minified javascript library, output was like :
and I wanted to change the default value of
ignoreOverlayto!0with that call :So I'm not really understanding why you use 2 different
RegExp()constructor based on the value returned byisWord()but using theRegExp()with boundary word (\b) was in fault. So I changedisWord()accordingly :and now it works but I'm not sure if it's the good solution.