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
I am trying to use RotatingFileStream as one of the streams in the new project. Since RotatingFileStream is defined inside the if(mv) conditional, it is getting undefined even if mv is available when used in strict mode.
Note that I need to enable strict mode globally by using --use_strict v8 flag (this is required for classes & block level support)
Instead of hiding the whole function definition inside if(which gets hoisted & removed in strict mode), I propose changing the visibility using module exports
Should fix usage with bundles including bunyan and using strict mode.
Had to fix a surprise effect that 'window === this' is no longer
true in strict mode:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
"""That means, among other things, that in browsers it's no longer
possible to reference the window object through this inside a strict
mode function."""
Fixes#236, #231, and #223.
I am trying to use RotatingFileStream as one of the streams in the new project. Since RotatingFileStream is defined inside the
if(mv)
conditional, it is gettingundefined
even ifmv
is available when used instrict
mode.Note that I need to enable
strict
mode globally by using--use_strict
v8 flag (this is required for classes & block level support)Instead of hiding the whole function definition inside
if
(which gets hoisted & removed in strict mode), I propose changing the visibility using module exportsThe text was updated successfully, but these errors were encountered: