Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clearroad/api

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clearroad/api

[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ClearRoad API

Conventional Commits

Install

$ npm install clearroad-api

Usage

If you want to include the files directly in your page, you can include via our CDN:

<script src="https://clearroadlab.azureedge.net/lib/rsvp.js"></script>
<script src="https://clearroadlab.azureedge.net/lib/jio.js"></script>
<script src="https://clearroadlab.azureedge.net/api/clearroad.js"></script>

Using with es6

import { ClearRoad } from 'clearroad-api';
const cr = new ClearRoad('apiUrl', 'login', 'password');

Using with CommonJS

const ClearRoad = require('clearroad-api').ClearRoad;
const cr = new ClearRoad('apiUrl', 'login', 'password');

Using with Node

const ClearRoad = require('clearroad-api/node').ClearRoad;
const cr = new ClearRoad('apiUrl', 'login', 'password');

Using a different local storage

By default, the api will use indexeddb as local storage. If you want to change the storage (or if you are using node and you need to), you can use:

const cr = new ClearRoad('apiUrl', 'login', 'password', {
  type: 'dropbox',
  accessToken: 'accessToken'
});

The options are:

TypeDescriptionOptionsSupportNeed access token
indexeddbNative Browser IndexedDB storagetype: stringBrowser onlyNo
dropboxStorage data in a dropbox accounttype: string, accessToken: stringBrowser and NodeYes
gdriveStorage data in a google drive accounttype: string, accessToken: stringBrowser and NodeYes

FAQs

Package last updated on 29 Aug 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc