open-index/open-npm huggingface dataset:
npm package: @hubro-platform/hubro-connect
Description: Hubro Connect is a multiplatform library enabling connection to Hubro services with support for Android, iOS, and JS (Web/NodeJS) platforms. This package provides the JavaScript/TypeScript/WASM implementation for web and Node.js environments.
Latest version: 1.4.3

# Hubro Connect

Hubro Connect is a multiplatform library enabling connection to Hubro services with support for Android, iOS, and JS (Web/NodeJS) platforms. This package provides the JavaScript/TypeScript/WASM implementation for web and Node.js environments.

## Features

- **Cross-platform support**: Unified API for Web, NodeJS, and WASM targets.
- **Federated Learning**: Built-in capabilities for privacy-preserving machine learning.
- **Caching System**: Integrated caching for efficient data management.
- **Type-safe API**: Fully typed for a better developer experience.

## Installation

Install via npm:

```bash
npm install @hubro-platform/hubro-connect
```

Or via yarn:

```bash
yarn add @hubro-platform/hubro-connect
```

## Quick Start

To start using Hubro Connect in your project, initialize a session using the `HubroSessionBuilder`:

```javascript
import { HubroSessionBuilder } from '@hubro-platform/hubro-connect';

const baseUrl = 'https://api.hubroplatform.no';
const tokenVerifier = 'your-token-verifier';

const session = new HubroSessionBuilder(baseUrl, tokenVerifier);

// Example: Initialize session with user credentials
async function setupSession() {
    try {
        const result = await session.initialize('username', 'password');
        console.log('Session initialized:', result);
    } catch (error) {
        console.error('Initialization failed:', error);
    }
}
```

## Platform Support

This package is optimized for:
- **Browser**: Modern browsers via ES6 modules or WASM.
- **Node.js**: Server-side environments.

## Documentation

For more detailed information and platform-specific guides, please visit our official documentation:

- [Android Documentation](https://docs.hubroplatform.no/android.html)
- [iOS Documentation](https://docs.hubroplatform.no/ios.html)
- [JavaScript/WASM Documentation](https://docs.hubroplatform.no/react.html)

## License

Copyright © Hubro Research AS 2026. All rights reserved.