标签云

微信群

扫码加入我们

WeChat QR Code


I know what 'use strict' does. But I would like to find a way to only use 'use strict' once without making it global.

2018年10月23日00分14秒

See also Why is 'use strict' usually after an IIFE (rather than at the top of a script)?

2018年10月23日00分14秒

"only use 'use strict' once without making it global." is exactly what your code does, it makes the module strict.

2018年10月23日00分14秒

I would however assume that libraries which choke on being run in strict mode have other problems…

2018年10月23日00分14秒