DS is a constructor function and produces instances of the core data store. The data store is the in-memory cache that manages your resources and your data.

Quick Start

npm install --save js-data js-data-http or bower install --save js-data js-data-http.

var store = new JSData.DS();

// register and use http by default for async operations
store.registerAdapter('http', new DSHttpAdapter(), { default: true });

// simplest model definition
var User = store.defineResource('user');

User.find(1).then(function (user) {
  user; // { id: 1, name: 'John' }
});

API

Asynchronous Methods

Synchronous Methods