admin管理员组文章数量:1316660
I found these properties prefixing underscore in package.json. What are they used for? why prefixing underscore on properties?
"_from": "[email protected]",
"_id": "[email protected]",
"_inCache": true,
"_location": "/react-scripts",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs",
"tmp": "tmp/react-scripts-0.9.3.tgz_1488303928068_0.6415497597772628"
},
"_npmUser": {
"name": "gaearon",
"email": "[email protected]"
},
I found these properties prefixing underscore in package.json. What are they used for? why prefixing underscore on properties?
"_from": "[email protected]",
"_id": "[email protected]",
"_inCache": true,
"_location": "/react-scripts",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.",
"tmp": "tmp/react-scripts-0.9.3.tgz_1488303928068_0.6415497597772628"
},
"_npmUser": {
"name": "gaearon",
"email": "[email protected]"
},
Share
Improve this question
asked Mar 6, 2017 at 12:22
RodsonRodson
5764 silver badges10 bronze badges
2 Answers
Reset to default 6Those are meta data reserved for package registries. All properties beginning with _ or $ are reserved for package registries to use at their discretion. wiki mon "Reserved Properties" section explains it.
Underscore is the reserved property of package.json, it is used for reserved keys. So, it is clearly mentioned in Documentation of package.json , we can't start a name with an underscore.
本文标签: javascriptWhat are these properties prefixing underscore used for in packagejsonStack Overflow
版权声明:本文标题:javascript - What are these properties prefixing underscore used for in package.json? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741997093a2410263.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论