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

[![Build Status](https://travis-ci.org/clearroad/clearroad-api.svg?branch=master)](https://travis-ci.org/clearroad/clearroad-api) [![Coverage Status](https://coveralls.io/repos/github/clearroad/clearroad-api/badge.svg?branch=master)](https://coveralls.io/

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
63
increased by46.51%
Maintainers
1
Weekly downloads
 
Created
Source

ClearRoad API

Build Status Coverage Status 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', 'accessToken');

Using with CommonJS

const ClearRoad = require('@clearroad/api').ClearRoad;
const cr = new ClearRoad('apiUrl', 'accessToken');

Using with Node

const ClearRoad = require('@clearroad/api/node').ClearRoad;
const cr = new ClearRoad('apiUrl', 'accessToken');

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', 'accessToken', {
  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

Keywords

FAQs

Package last updated on 06 Sep 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