mentie 0.1.21 → 0.1.22

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.
@@ -31,8 +31,8 @@ export const require_props = ( obj={}, required_properties=[], error_on_fail=tru
31
31
  const missing_properties = required_properties.filter( prop => !keys.includes( prop ) )
32
32
 
33
33
  // If properties are missing, throw errors or return false
34
- if( error_on_fail && !missing_properties.length ) throw new Error( `Missing required properties on object: ${ missing_properties.join( ', ' ) }` )
35
- if( !missing_properties.length ) return false
34
+ if( error_on_fail && missing_properties.length ) throw new Error( `Missing required properties on object: ${ missing_properties.join( ', ' ) }` )
35
+ if( missing_properties.length ) return false
36
36
 
37
37
  // If all good, return true
38
38
  return true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mentie",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Mentor's toolbelt",
5
5
  "type": "module",
6
6
  "main": "index.js",