Comparing version 0.1.16-alpha.4 to 0.1.16-alpha.6
@@ -19,3 +19,4 @@ let currentConfig = { | ||
} | ||
return require('jsonpath').value(currentConfig, configPath) || defaultValue | ||
const result = require('jsonpath').value(currentConfig, configPath) | ||
return result === undefined ? defaultValue : result | ||
} | ||
@@ -22,0 +23,0 @@ |
@@ -12,4 +12,2 @@ const { NestedValidationError } = require('./errors') | ||
const filterTruthy = item => Boolean(item) | ||
const throwFirstUnknownError = errors => { | ||
@@ -39,3 +37,3 @@ const unknownErrors = errors.filter( | ||
return await Promise.all( | ||
validators.filter(filterTruthy).map(async fn => { | ||
validators.filter(Boolean).map(async fn => { | ||
try { | ||
@@ -56,3 +54,3 @@ return await fn(...args) | ||
const results = await runValidators(args) | ||
const errors = results.filter(filterTruthy) | ||
const errors = results.filter(Boolean) | ||
throwFirstUnknownError(errors) | ||
@@ -63,2 +61,2 @@ throwValidationError(errors) | ||
module.exports = { concatValidators, filterTruthy, filterUnique, serialize } | ||
module.exports = { concatValidators, filterUnique, serialize } |
{ | ||
"name": "djorm", | ||
"version": "0.1.16-alpha.4", | ||
"version": "0.1.16-alpha.6", | ||
"description": "Django like ORM framework", | ||
@@ -39,3 +39,3 @@ "author": "Pavel Žák <pavel@zak.global>", | ||
}, | ||
"gitHead": "587877d4f462247cb6d0cc13c69bf26795884855" | ||
"gitHead": "1bdf0e5a88c3927f7db98d45b43e561ffecf9e66" | ||
} |
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
86053