# furhat-gui

> Client library for connecting to a Furhat skill from a skill GUI

Latest version **0.1.0** (published 2021-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install furhat-gui
pnpm add furhat-gui
yarn add furhat-gui
bun add furhat-gui
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-02-22 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | subbu |
| Maintainers | subbualagappan |
| Keywords | furhat-gui |

## Links

- npm: https://www.npmjs.com/package/furhat-gui
- Repository: https://github.com/FurhatRobotics/FurhatJSGUI
- Homepage: https://github.com/FurhatRobotics/FurhatJSGUI#readme
- Issues: https://github.com/FurhatRobotics/FurhatJSGUI/issues
- npm.io page: https://npm.io/package/furhat-gui

## Dependencies (1)

- [furhat-core](https://npm.io/package/furhat-core.md) 0.2.0

## Recent versions

- 0.1.0 (latest) — 2021-02-22
- 0.0.11 — 2018-11-13
- 0.0.10 — 2018-11-13
- 0.0.9 — 2018-05-08
- 0.0.8 — 2018-05-08
- 0.0.5 — 2018-03-02
- 0.0.4 — 2018-03-01
- 0.0.3 — 2018-02-21
- 0.0.2 — 2018-01-12
- 0.0.1 — 2018-01-12

## README

# furhat-gui

[![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)
[![NPM version](https://img.shields.io/npm/v/furhat-gui.svg?style=flat-square)](https://npmjs.org/package/furhat-gui)
[![Build Status](https://img.shields.io/travis/FurhatRobotics/FurhatJSGUI/master.svg?style=flat-square)](https://travis-ci.org/FurhatRobotics/FurhatJSGUI) [![Coverage Status](https://img.shields.io/codecov/c/github/FurhatRobotics/FurhatJSGUI/master.svg?style=flat-square)](https://codecov.io/gh/FurhatRobotics/FurhatJSGUI/branch/master)

Client library for connecting to a Furhat skill from a skill GUI

## Install

    $ npm install --save furhat-gui

## Usage

```js
import FurhatGUI, { Furhat } from 'furhat-gui'

let furhat: Furhat = null

function setupSubscriptions () {
    furhat.subscribe('com.myapp.MyCustomEvent', (event) => {
        console.log('received event: ', event.event_name)
    })
}

FurhatGUI()
    .then(connection => {
        furhat = connection
        furhat.onConnectionError((_connection: WebSocket, ev: globalThis.Event) => {
            console.error("Error occured while connecting to Furhat skill")
        })
        furhat.onConnectionClose(() => {
            console.warn("Connection with Furhat skill has been closed")
        })
        setupSubscriptions()
    })
    .catch(console.error)

// Later somewhere in the code (after awaiting for the connection promise)
furhat.send({
    event_name: 'MyEvent',
    param1: 'MyParam1'
})
```

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

-   [FurhatGUI](#furhatgui)

### FurhatGUI

FurhatGUI Function which sets up a connection to the furhat skill and gives
the furhat object to send and recieve events to the skill.

Returns **any** Promise that will return the promise with a `Furhat` obkect

---
_Source: https://npm.io/package/furhat-gui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
