open-index/open-npm huggingface dataset:
npm package: @moovio/moov-js
Description: Moov.js loader
Author: Moov Financial
Latest version: 0.0.21

# Moov.js loader

Use this module to initialize [Moov.js](https://docs.moov.io/moovjs/) in your client side web application.

## Install

Use `npm` to install the Moov.js module.

```bash
npm install @moovio/moov-js
```

## Initialize

### `loadMoov`
Import `loadMoov` from the newly installed package. After you generate an [access token](https://docs.moov.io/moovjs/authentication/) you can add it as a parameter to `loadMoov`. This function returns a `Promise` with a `Moov` object once Moov.js has been loaded. It will also load Moov.js and insert it in a script tag if it does not already exist in the DOM. If there is no DOM, like in a server environment, it will resolve to `null`.

```js
import { loadMoov } from '@moovio/moov-js';

const moovToken = "eyJhbGciOiJSUzI1NiIsIm...";
const moov = await loadMoov(moovToken);
```

The `moov` instance is now available for use!

```
moov.accounts.create({...});
```

## Moov.js documentation

Refer to [our docs](https://docs.moov.io/moovjs/) for more information about how to use Moov.js for onboarding and moving money.