Open jmsv opened 5 years ago
On redesign
this just returns undefined
copying the behaviour of find
.
Feel like an error should be thrown when trying to call get
with a key that’s not indexed
Ah I see your point. If options.keys
is defined then yes I agree, otherwise no. If the data is dynamic then they might not always have that key but sometimes could, I would rather have undefined or an empty array returned in this case than have to handle an error.
Throw error when:
.get()
function is called with key that isn't indexed