Open
Description
Was looking for has
today and couldn't find it. I can implement has
and hasIn
(Seems to be the exact same to me) using the Symfony Property Access component (SPAC after) but will have one slight difference from the lodash support because SPAC doesn't support one of the suggested approach in the lodash docs. Also, it will obviously require the addition of a small dependency. Are you ok with it?
References:
The differences would be:
var object = { 'a': { 'b': 2 } };
var other = _.create({ 'a': _.create({ 'b': 2 }) });
_.has(object, ['a', 'b']);
// => broken, SPAC cannot resolve paths using arrays of keys
I will wait for your approval to start work on this.
Metadata
Metadata
Assignees
Labels
No labels