Add `is` function
goliatone opened this issue · comments
goliatone commented
We want to be able to do:
let result = { entity: {id:'fwkd23', uuid: 'adfa-asdfawe'}};
KeyPath.is(result, 'entity.id', 'fwkd23');
Currently we would do that as follows:
KeyPath.get(result, 'entity.id', '') === 'fwkd23';
goliatone commented
Maybe use equals
?
KeyPath.equals(result, 'entity.id', 'fwkd23');