config-repo
config-repo is a dead simple JavaScript configuration repository.
Features
- Super simple to use.
- API inspired by Laravel Config.
- Lightweight package (992 B gzip).
- Works in Node.js and web browsers.
- Access configurations with dot notation.
- Locking and unlocking of configurations.
Installation
Via NPM:
$ npm install --save config-repo
Via CDN: (use the config
variable)
Polyfill
This JavaScript package is using the ES2015 Object.assign()
method which is not supported on older web browsers. Using a polyfill will provide that missing native method.
Overview
'use strict'; const config = ; // Initialize the configuration repository.config; // Set a configuration value.config; // Get a configuration value.config;// => bar // Get all configuration values.configall;// => {..., foo: 'bar'} // You can also use the helper methods.;;;;
Resources
License
MIT © Midnite Ninja Innovations. See the LICENSE file for full license text.