GithubHelp home page GithubHelp logo

isabella232 / js-data-adapter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gimpboy/js-data-adapter

0.0 0.0 0.0 424 KB

Base adapter class that all other js-data adapters extend.

License: MIT License

JavaScript 100.00%

js-data-adapter's Introduction

js-data logo

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

js-data-adapter's People

Contributors

gimpboy avatar greenkeeperio-bot avatar jmdobry avatar nickescallon avatar nvahalik avatar stalniy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.