You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function log(...args) {
debug && console.log(...args);
}
yields:
function log(...args) {
debug && ...args;
}
cause error:
Uncaught SyntaxError: Unexpected token '...'
I referenced #1879 but don't feel this is quite applicable to my usage scenario.
The code comes from a third-party tool script library under node_modules, and I can't modify its code directly. debug is a local variable that is passed in when the tool is instantiated and cannot be defined by modifying environment variables.
I also tried drop but it didn't feel right because I only wanted to remove console.log and still needed to keep methods like console.error
The text was updated successfully, but these errors were encountered:
source:
yields:
cause error:
I referenced #1879 but don't feel this is quite applicable to my usage scenario.
The code comes from a third-party tool script library under
node_modules
, and I can't modify its code directly.debug
is a local variable that is passed in when the tool is instantiated and cannot be defined by modifying environment variables.I also tried
drop
but it didn't feel right because I only wanted to removeconsole.log
and still needed to keep methods likeconsole.error
The text was updated successfully, but these errors were encountered: