Any way to force strict mode in node?

后端 未结 5 1821
故里飘歌
故里飘歌 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:54

    According to Lloyd you can now place

    "use strict";
    

    at the top of your file in node >= 0.10.7, but if you want your whole app to run in strict (including external modules) you can do this

    node --use_strict

提交回复
热议问题