0.2.1 • Published 10 years ago

json-comments v0.2.1

Weekly downloads
377
License
-
Repository
github
Last release
10 years ago

json-comments

Comments support for json with require.

Installation

$ npm install json-comments

Syntax:

// require `json-comments` in your main module only once
require('json-comments');

Examples:

config.json

{
  // this is host
  "host" : "localhost",

  "port" : 3000, //port

  /*
  * comments support for json
  */
  "username": "abc"
}

app.js

require('json-comments');
var config = require('./config');

console.log(config);
// ...

License

MIT