# @webthatmatters/ybit-js-sdk

> yBit JS SDK !

Latest version **1.1.4** (published 2019-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @webthatmatters/ybit-js-sdk
pnpm add @webthatmatters/ybit-js-sdk
yarn add @webthatmatters/ybit-js-sdk
bun add @webthatmatters/ybit-js-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2019-06-05 |
| First published | 2019-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | sofia@monospacelabs.com |
| Maintainers | dukemono, fozuzip, georgesde, giannisdim, koshat, sofia123424 |

## Links

- npm: https://www.npmjs.com/package/@webthatmatters/ybit-js-sdk
- Repository: https://gitlab.com/webthatmatters/ybit/sdk/js-sdk
- npm.io page: https://npm.io/package/@webthatmatters/ybit-js-sdk

## Recent versions

- 1.1.4 (latest) — 2019-06-05
- 1.1.3 — 2019-06-05
- 1.1.2 — 2019-06-05
- 1.1.1 — 2019-06-05
- 1.1.0 — 2019-06-05
- 1.0.5 — 2019-06-05
- 1.0.4 — 2019-06-05
- 1.0.3 — 2019-06-05
- 1.0.2 — 2019-06-05
- 1.0.1 — 2019-05-03
- 1.0.0 — 2019-05-03

## README

# yBit JS SDK

### Installation

```
  npm install @webthatmatters/ybit-js-sdk 
```

### Initialization

```
  import Ybit from '@webthatmatters/ybit-js-sdk';

  ...

  getToken = () => {
    const promise = new Promise(function(resolve, reject) {
      setTimeout(function() {
        resolve('INTEGRATION_TOKEN');
      }, 300);
    });

    return promise;
  };

  ...

  const yBit = new Ybit(this.getToken);
```

When in development pass your api URL and ui URL as a second param:

```
const yBit = new Ybit(this.getToken, {
  apiURL: 'http://localhost:3001',
  uiURL: 'http://localhost:3002'
})
```

### Render Folders Tree

Create a container element

```
<div id="ybit-folders" />
```

and call the yBit foldersSelect function.

```
yBit.foldersSelect({ container: '#ybit-folders' }, data => {
  // This will be called every time a folder is selected
  console.log(data);
});
```

---
_Source: https://npm.io/package/@webthatmatters/ybit-js-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
