AJAX Abstraction for Lists of Resources


The interface for Collections is heavily inspired by Backbone, and largely mirrors the implementation of Backbone.Collection.

Unlike Backbone's intended usage however, this library should not be used to pass data through your application. It is intended to be used solely as an abstraction tier to simplify AJAX requests.

This means when using it, the expectation is that you configure your Collection, instantiate it with data, make the appropriate request, and then serialize the collection back into JSON data before using it in your application.

The major differences between Backbone.Collection and this version of Collection are:

  • All event emitters have been removed. This is purely an abstraction tier, not a way to store your data, or detect when that data has changed.
  • The jQuery.ajax method has been replaced with axios for managing AJAX calls, which also facilitates testing in a non-browser environment (i.e. Node).