Configuration API example in regular JavaScript?


I’ve written my package in JavaScript and it’s working.

But I can’t find any examples of specifying configuration settings in such a package.

Can anybody share what I need to put in module.exports?



Aha! I found a suitable example at:


var config = require('./config-schema.json');
module.exports.config = config;


  "activateHyperMode": {
    "description": "Turns the package into hyper mode.",
    "type": "boolean",
    "default": false
  "setRange": {
    "type": "integer",
    "default": 42,
    "minium": 1,
    "maximum": 9000