gpt4 book ai didi

javascript - 这些在 package.json 中使用下划线前缀的属性是什么?

转载 作者:搜寻专家 更新时间:2023-10-31 23:16:04 25 4
gpt4 key购买 nike

我在 package.json 中发现这些属性带有下划线前缀。它们的用途是什么?为什么在属性上加前缀下划线?

  "_from": "react-scripts@0.9.3",
"_id": "react-scripts@0.9.3",
"_inCache": true,
"_location": "/react-scripts",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/react-scripts-0.9.3.tgz_1488303928068_0.6415497597772628"
},
"_npmUser": {
"name": "gaearon",
"email": "dan.abramov@gmail.com"
},

最佳答案

那些是为包注册保留的元数据。所有以 _ 或 $ 开头的属性都保留给包注册中心自行决定使用。 wiki common "Reserved Properties" section解释一下。

关于javascript - 这些在 package.json 中使用下划线前缀的属性是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42625563/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com