Miss any of our Open RFC calls?Watch the recordings here! »

@chargetrip/javascript-sdk

0.12.0 • Public • Published

@chargetrip/sdk

@chargetrip/javascript-sdk

Version MIT License

JavaScript SDK for Chargetrip services.

Disclaimer: The package is under active development and the final API is a subject to change.

Installation & usage

Install the package in your project:

yarn add @chargetrip/javascript-sdk

Then import it and initialize:

import { sdk } from '@chargetrip/javascript-sdk';
 
sdk.init({
  clientId: '<your_client_id>',
});

Target support

@chargetrip/sdk supports:

  • TypeScript - provides type declarations for the JavaScript files
  • Browser - provides pre-built and minified ESM modules for those browsers
  • React Native - provides source code (the build will done in your project)
  • Node - provides pre-built CJS modules for Node 10+

If you need to target different environments or only modern browsers, we recommend to setup compilation of the shipped source code in your project. The source code is available in @chargetrip/sdk/src directory. If you're using using Babel, please make sure the following presets/plugins are included in your Babel config:

  • @babel/preset-typescript
  • @babel/plugin-proposal-class-properties
  • @babel/plugin-proposal-optional-chaining
  • @babel/plugin-proposal-nullish-coalescing-operator

Sponsors

Chargetrip logo

Install

npm i @chargetrip/javascript-sdk

DownloadsWeekly Downloads

11

Version

0.12.0

License

MIT

Unpacked Size

2.12 MB

Total Files

36

Last publish

Collaborators

  • avatar
  • avatar
  • avatar