Any way to force strict mode in node?

后端 未结 5 1822
故里飘歌
故里飘歌 2020-11-28 21:16

Could not find this answer anywhere, but I did find several mailing lists where this was discussed, these are rather old however and I have no idea if this is implemented or

5条回答
  •  春和景丽
    2020-11-28 21:37

    You can also provide the strict flag on the shebang interpreter directive.

    #!/usr/bin/env node --use_strict
    

    But currently (at least pre v0.9.x) it suffers the same problems described by the comments in @chad-scira's answer discuss.

提交回复
热议问题