devour-client
devour-client copied to clipboard
Properties being used on data array
JSON API's responses look like:
{
data: [...],
links: {...},
meta: {...}
}
Devour ends up storing the links and meta information as properties on the data array:
{
data: [
...,
links: {...},
meta: {...}
]
}
Since storing properties on arrays isn't very conventional I've found it can lead to unpredictable results.
One such instance of this unpredictable behaviour is with Lodash's cloneDeep method, which ends up removing these array properties entirely.