What is purpose of the property "private" in package.json?


Question

I'm learning node.js and express, I am wondering what is the property "private" in ./package.json file used for?

1
121
1/31/2019 12:38:22 PM

Accepted Answer

Taken from this site, https://docs.npmjs.com/files/package.json#private

private

If you set "private": true in your package.json, then npm will refuse to publish it.

This is a way to prevent accidental publication of private repositories.

158
2/6/2017 10:43:52 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon