Need private packages and team management tools?Check out npm Teams »

join-includes

0.0.4 • Public • Published

join-includes

Build Status Coverage Status npm version Downloads

Function for re-treeing JSON API formatted payloads

Usage

Add to your project:

npm install join-includes

And import the function:

import joinIncludes from 'join-includes'

fetch('http://your-site.com/api/whatever?include=otherstuff').then(response => {
  return response.json()
}).then(data => {
  const joinedData = joinIncludes(data.data, data.included)
  console.log(joinedData)
})

Install

npm i join-includes

DownloadsWeekly Downloads

17

Version

0.0.4

License

MIT

Unpacked Size

13 kB

Total Files

16

Last publish

Collaborators

  • avatar