Socket
Book a DemoInstallSign in
Socket

@drieam/common

Package Overview
Dependencies
Maintainers
5
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drieam/common

Default Drieam api wrapper

latest
npmnpm
Version
7.11.6
Version published
Maintainers
5
Created
Source

npm

@drieam/common

This package include some utilities used by Drieam LTI apps.

Getting Started

Installation

Install the @drieam/common and its dependencies.

yarn add @drieam/common

Read the full API Documentation

Options

General settings of an action as an extension of api actions.

{
  withErrorHandler: true,
  csrfToken: getCSRFToken(),
  history: createBrowserHistory(),
  toasts: {
    offline: {
      duration: 0,
      message: 'Not connected.',
    },
    save: { message: 'Saved success.' },
    delete: { message: 'Deleted success.' },
  },
};
}
  • Attributes:
    • withErrorHandler (boolean): Enables ErrorHandlingMiddleware (Default: true). Provides feedback through an Antd Notification on offline, save success or fail action.
    • toasts (object): Notification settings, you can express which message can be provided by the error handler.
    • history (object): history is a JavaScript library that lets you easily manage session history anywhere JavaScript runs. (default: require 'history').
    • csfrToken (string): Cross-site request forgery token. (Default: <meta [name="csrf-token"] />).
    • Api options

FAQs

Package last updated on 24 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts