Comparing version 1.7.9 to 1.8.0
{ | ||
"name": "cz", | ||
"version": "1.7.9", | ||
"version": "1.8.0", | ||
"description": "A simple config utility for nodejs", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -10,5 +10,5 @@ # cz | ||
<!-- - [What's included](#whats-included) | ||
- [Bugs and feature requests](#bugs-and-feature-requests) | ||
- [Bugs and feature requests](#bugs-and-feature-requests) --> | ||
- [Documentation](#documentation) | ||
- [Contributing](#contributing) | ||
<!-- - [Contributing](#contributing) | ||
- [Community](#community) | ||
@@ -22,8 +22,14 @@ - [Versioning](#versioning) | ||
````js | ||
const path = require('path'); | ||
const config = require('cz'); | ||
const Cz = require('cz'); | ||
const config = new Cz(); | ||
// Loads the config file into cz | ||
// Loads the config file into Cz | ||
config.load('./config.json'); | ||
// Sets Cz's default value for "port" to 4000 | ||
// If the value is unset using config.set('port', null) then Cz will fall back to 4000 | ||
config.defaults({ | ||
port: 4000 | ||
}); | ||
// Sets Cz to { random: 'random value' } | ||
@@ -30,0 +36,0 @@ config.set('random', 'random value'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
333042
77