Closed Kaelinator closed 6 years ago
Perhaps it should assume being quiet by default, and if .thump
is present, then the errors with be thrown.
For instance:
burrow.thump.get('a.b', {})
will throw something along the lines of Parent property 'a' does not exist
This way, the user can easily set all to thump within the require, or use it in specific cases.
Instead of simply returning an undefined value, the user should be able to specify whether or not an error is thrown when something goes wrong.
Something like:
burrow.quietly.get( ... )
should not throw errors, but return undefined, while:burrow.loudly.get( ... )
should throw a descriptive error.Semantics are up for debate.