dejs

0.7.5 • Public • Published

dejs

A collection of utility libraries used by other DataEye JS projects.

Build Status

codecov.io

Component List

  • ajax (based on superagent)
  • chart (build charts more easier, based on highcharts)
  • error (an error tip for react)
  • footer
  • loading (a react component for display loading effect)
  • mock (baseon on superagent-mocker)
  • no-data (no data tips for query result)
  • redux-ajax-middleware
  • reduxis (help us build redux based component easily)
  • timer
  • utils

Usage

import reduxis from 'dejs/lib/reduxis'
import Loading from 'dejs/lib/loading'
import ajax, {get, post} from 'dejs/lib/ajax'
 
// jQuery like
ajax({
  url: '/',
  data: {},
  success: (json, res) => {
    // success
  },
  error: (err, res) => {
    // error
  },
  complete: () => {
    // complete
  }
})
 
// Promise
ajax({
  url: '/',
  method: 'post'
}).then(function(res) {
  console.log(res.body)
})

/dejs/

    Package Sidebar

    Install

    npm i dejs

    Weekly Downloads

    10

    Version

    0.7.5

    License

    BSD-3-Clause

    Unpacked Size

    96.6 kB

    Total Files

    40

    Last publish

    Collaborators

    • bobhe
    • damngoto