@kofile/config-factory
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -70,3 +70,6 @@ const EventEmitter = require('events') | ||
if (error) { | ||
this.emit(INVALID, `${error.message} — got \`${inspect(value)}\``) | ||
this.emit( | ||
INVALID, | ||
new Error(`${error.message} — got \`${inspect(value)}\``) | ||
) | ||
} | ||
@@ -73,0 +76,0 @@ |
@@ -1,1 +0,1 @@ | ||
{"name":"@kofile/config-factory","version":"1.0.1","description":"Config client with optional validation","author":"Evan Sherwood <evan@sherwood.io>","license":"MIT","main":"index.js","files":["index.js"],"devDependencies":{"ava":"^0.22.0","commitizen":"^2.9.6","coveralls":"^2.13.1","cz-cli":"^1.0.0","cz-conventional-changelog":"^2.0.0","husky":"^0.13.4","lint-staged":"^3.6.0","nyc":"^11.1.0","prettier-standard":"^6.0.0","semantic-release":"^8.2.0","sinon":"^4.0.1","snazzy":"^7.0.0","standard":"^10.0.3"},"lint-staged":{"*.js":["prettier-standard","git add"]},"scripts":{"precommit":"lint-staged","commit":"git-cz","lint":"standard | snazzy","test":"nyc ava","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"nyc":{"include":["index.js"]},"repository":{"type":"git","url":"https://github.com/kofile/config-factory.git"},"dependencies":{"clone":"^2.1.1","joi":"^13.0.0"}} | ||
{"name":"@kofile/config-factory","version":"1.0.2","description":"Config client with optional validation","author":"Evan Sherwood <evan@sherwood.io>","license":"MIT","main":"index.js","files":["index.js"],"devDependencies":{"ava":"^0.22.0","commitizen":"^2.9.6","coveralls":"^2.13.1","cz-cli":"^1.0.0","cz-conventional-changelog":"^2.0.0","husky":"^0.13.4","lint-staged":"^3.6.0","nyc":"^11.1.0","prettier-standard":"^6.0.0","semantic-release":"^8.2.0","sinon":"^4.0.1","snazzy":"^7.0.0","standard":"^10.0.3"},"lint-staged":{"*.js":["prettier-standard","git add"]},"scripts":{"precommit":"lint-staged","commit":"git-cz","lint":"standard | snazzy","test":"nyc ava","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"nyc":{"include":["index.js"]},"repository":{"type":"git","url":"https://github.com/kofile/config-factory.git"},"dependencies":{"clone":"^2.1.1","joi":"^13.0.0"}} |
@@ -79,2 +79,4 @@ # ConfigFactory | ||
The event listener will receive `error` from the validation result. Get the message of the failure with `error.message`. | ||
Subscribing an event handler and invoking `config.validate()` is the ***preferred*** way of handling configuration validation. The previous method (throwing an error on a property-by-property basis) is only there as a fail-safe against forgetting to invoke `validate()`. | ||
@@ -81,0 +83,0 @@ |
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
7149
62
106