nmsn / blog

记录日常遇到的问题,需要记录的笔记以及新学到的知识,会进行汇总和分类,自动更新 README,欢迎评论和补充,互相学习
36 stars 0 forks source link

process.env 赋值的属性会隐式转化为 string 类型 #25

Open nmsn opened 2 years ago

nmsn commented 2 years ago

来源:https://nodejs.org/dist/latest-v8.x/docs/api/process.html#process_process_env

process.env.test = null;
console.log(process.env.test);
// => 'null'
process.env.test = undefined;
console.log(process.env.test);
// => 'undefined'