Is it safe to remove "use strict" from a third party library

185 Views Asked by At

I am using a pretty terrible library on the front-end. In their installation instructions, they tell to copy-paste some code, that starts with "use strict". And yet their code throws an error in some old browsers.

I am tempted to simply remove the "use strict" instruction from the code I have copy-pasted.

Is it safe though? Can it lead to a change of behaviour for the end user, apart from being more flexible?

The MDN article about strict mode states that Strict mode isn't just a subset: it intentionally has different semantics from normal code: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.

0

There are 0 best solutions below