Add another param to `get`
ardok opened this issue · 1 comments
ardok commented
What do you think of adding a default value param into get
?
(dotty.get(obj, 'a.b.c') || []).length
// instead, we could do this
dotty.get(obj, 'a.b.c', []).length
// hence, interface would look like
var get = module.exports.get = function get(object, path, defaultVal) {
...