The result of the callback function or the default if an exception occurred calling the callback function.
0.9.5
let theExpression = "{ invalid: json value";
let result = safeGet(() => {
return JSON.parse(theExpression);
}, {});
// result === {};
Function to safely execute a callback function, if the function throws the provided default value will be returned.