devour-client icon indicating copy to clipboard operation
devour-client copied to clipboard

Properties being used on data array

Open themarkappleby opened this issue 9 years ago • 0 comments

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.

themarkappleby avatar May 20 '16 13:05 themarkappleby