# babascript-client

> babascript client for node

Latest version **0.2.2** (published 2014-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install babascript-client
pnpm add babascript-client
yarn add babascript-client
bun add babascript-client
```

## 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.2.2 |
| Published | 2014-09-22 |
| First published | 2014-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Takumi Baba |
| Maintainers | takumibaba |

## Links

- npm: https://www.npmjs.com/package/babascript-client
- Repository: https://github.com/babascript/node-babascript-client
- Issues: https://github.com/babascript/node-babascript-client/issues
- npm.io page: https://npm.io/package/babascript-client

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [babascript](https://npm.io/package/babascript.md) ^0.1.13
- [babascript-linda-adapter](https://npm.io/package/babascript-linda-adapter.md) *

## Recent versions

- 0.2.2 (latest) — 2014-09-22
- 0.2.1 — 2014-09-21
- 0.1.1 — 2014-06-27
- 0.1.0 — 2014-06-21
- 0.0.8 — 2014-06-11
- 0.0.7 — 2014-06-11
- 0.0.6 — 2014-06-11
- 0.0.5 — 2014-05-27
- 0.0.4 — 2014-05-27
- 0.0.3 — 2014-05-21
- 0.0.2 — 2014-05-18
- 0.0.1 — 2014-05-18

## README

# BabaScript Client

* BabaScript Client は、BabaScriptからの命令を受け取るためのクライアントです。

## initialize

    Client = require "babascript-client"
    client = new Client "name"

## client.on "get_task", callback

    client.on "get_task", (result)->
      # タスクを受け取った時の処理を記述する

* client に get_task という名前でコールバックを登録する
* client が script からの命令を受け取ると、登録されているメソッドが実行される。

## client.returnValue(value)

    client.returnValue true

* returnValue メソッドを用いることで、script側に命令を返すことができる。
* 現在実行中のタスクの返り値

## client.on "cancel_task", callback

    client.on "cancel_task", (task)->
      # タスクがキャンセルされた時の処理を記述する

* script 側の事情で命令がキャンセルされた時、このメソッドが呼ばれる。

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