mentie 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/cache.js +1 -1
- package/modules/validations.js +1 -1
- package/package.json +1 -1
package/modules/cache.js
CHANGED
package/modules/validations.js
CHANGED
|
@@ -31,7 +31,7 @@ export const require_props = ( obj={}, required_properties=[], error_on_fail=tru
|
|
|
31
31
|
const contains_all_required = required_properties.every( key => keys.includes( key ) )
|
|
32
32
|
|
|
33
33
|
// If properties are missing, throw errors or return false
|
|
34
|
-
if( error_on_fail && !contains_all_required ) throw new Error( `Missing required properties on object` )
|
|
34
|
+
if( error_on_fail && !contains_all_required ) throw new Error( `Missing required properties on object: ${ required_properties.join( ', ' ) }` )
|
|
35
35
|
if( !contains_all_required ) return false
|
|
36
36
|
|
|
37
37
|
// If all good, return true
|