How do I add comments to package.json for npm install?

This has recently been discussed on the Node.js mailing list.

According to Isaac Schlueter who created npm:

… the “//” key will never be used by npm for any purpose, and is reserved for comments … If you want to use a multiple line comment, you can use either an array, or multiple “//” keys.

When using your usual tools (npm, yarn, etc.), multiple “//” keys will be removed. This survives:

{ "//": [
  "first line",
  "second line" ] }

This will not survive:

{ "//": "this is the first line of a comment",
  "//": "this is the second line of the comment" }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)