merge-analytics

0.0.3 • Public • Published

REDUX-SHRINKWRAP

Contribution Guide

Just make sure to use conventional commits.

Release process

  1. make push

Notes


const state = {
  resources: {
    stacks: {
      stack1: {
        id: 'stack1',
        type: 'stacks',
        attributes: {
          name: 'Stackshack',
          description: 'Best stack in the world',
        },
        relationships: {
          user: {
            data: {
              id: 'user1',
              type: 'users'
            }
          },
          shirts: {
            data: [{
              id: 'shirt1',
              type: 'shirts',
            }, {
              id: 'shirt2',
              type: 'shirts'
            }]
          }
        },
        $meta: {
          isLoaded: null,
          isLoading: null,
          isError: null,
          isNull: null,
          isTried: null,
          timestamp: new Date(),
        },
        $links: {
          self: 'http://link.to?self'
        }
      }
    }
  },
  queries: {
    products: {
      '/?query=angular&limit=3': {
        queryId: '/?query=angular',
        queryType: 'products',
        results: [
          {
            id: 'product1',
            type: 'products',
          },
          {
            id: 'product2',
            type: 'products',
          },
          {
            id: 'product3',
            type: 'products',
          },
        ],
        $meta: {
          get: {
            isLoaded: true,
            isLoading: false,
            isError: false,
            isEmpty: !payload.data.length,
            timestamp: new Date().getTime(),
          },
          next: {
            isLoaded: true,
            isLoading: false,
            isError: false,
            isEmpty: !payload.data.length,
            timestamp: new Date().getTime(),
          },
          previous: {
            isLoaded: true,
            isLoading: false,
            isError: false,
            isEmpty: !payload.data.length,
            timestamp: new Date().getTime(),
          }
        },
        $links: {
          next: 'http://link.to?next-page-of-results',
          previous: 'http://link.to?previous-page-of-results',
        }
      }
    }

  }
}

/merge-analytics/

    Package Sidebar

    Install

    npm i merge-analytics

    Weekly Downloads

    0

    Version

    0.0.3

    License

    ISC

    Unpacked Size

    615 kB

    Total Files

    68

    Last publish

    Collaborators

    • morgs32