1.0.0 • Published 9 years ago

config-singleton v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

config-singleton

common JS module that requires a JSON file and provides a mutable config singleton that can be required everywhere else

Getting Started

1. Installation

npm install config-singleton

2. Examples

// defaults.json
{
  "defaultLanguage": "en"
}

// main.js
require('config-singleton').load('defaults.json');
    
// module.js
var config = require('config-singleton');   
console.log("default language is %s", config.defaultLanguage);

Copyright and license

Copyright (c) 2015, Any Code lee@anycode.io

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.