Socket
Book a DemoInstallSign in
Socket

ampersand-jsonapi-collection

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

ampersand-jsonapi-collection

An extension to ampersand-rest-collection that adds methods and properties for working with JSON-API.

unpublished
latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

ampersand-jsonapi-collection

AmpersandJSONAPICollection is a JSON-API-compatible extension of the AmpersandJS REST Collection.

It achieves this JSON-API compatibility by overriding select methods within ampersand-rest-collection and adding appropriate HTTP headers to requests.

Installing

npm install ampersand-jsonapi-collection

API Reference

Except as described below, AmpersandJSONAPICollection has the same interface as AmpersandRestCollection and AmpersandState.

To ensure this, AmpersandJSONAPICollection passes all tests for AmpersandRestCollection (version 5.0.0).

The following methods have been overridden:

parse model.parse(data)

This has been augmented to parse JSON-API formatted data: specifically a format in which model attributes are nested within the structure { data: [ { attributes: {} } ] }.

serialize model.serialize()

This has been augmented in order to serialize data into the correct format expected by JSON-API.

Keywords

jsonapi

FAQs

Package last updated on 05 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts