1.0.1 • Published 5 years ago

js-data-adapter v1.0.1

Weekly downloads
2,665
License
MIT
Repository
github
Last release
5 years ago

js-data-adapter

Slack Status npm version npm downloads build coverage

Base adapter class that all other JSData adapters extend.

Refer to the various JSData adapter repositories to see how they extend Adapter.

Usage

Browser-based adapter
npm i --save js-data js-data-adapter
Node.js based adapter
npm i --save js-data js-data-adapter

Now extend the adapter:

import {Adapter} from 'js-data-adapter'
// ES6
class MyAdapter extends Adapter {}
var Adapter = require('js-data-adapter').Adapter
// Use Adapter.extend
var MyAdapter = Adapter.extend()
var Adapter = require('js-data-adapter').Adapter

// Manually extend
function MyAdapter (opts) {
  Adapter.call(this, opts)
}

// Setup prototype inheritance from Adapter
MyAdapter.prototype = Object.create(Adapter.prototype, {
  constructor: {
    value: MyAdapter,
    enumerable: false,
    writable: true,
    configurable: true
  }
})

Object.defineProperty(MyAdapter, '__super__', {
  configurable: true,
  value: Adapter
})

Links

License

The MIT License (MIT)

Copyright (c) 2016 js-data-adapter project authors

1.0.1

5 years ago

1.0.0

7 years ago

0.8.5

7 years ago

0.8.4

7 years ago

0.8.3

7 years ago

0.8.2

8 years ago

0.8.1

8 years ago

0.8.0

8 years ago

0.7.4

8 years ago

0.7.3

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.2

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago