0.1.0 • Published 7 years ago
@nuware/actors v0.1.0
Actors
Install
npm install @nuware/actors --save
or
<script defer src="https://unpkg.com/@nuware/actors@latest/dist/actors.umd.js"></script>
or
<script defer src="https://unpkg.com/@nuware/actors@latest/dist/actors.umd.min.js"></script>
Usage
Browser
const { hookup, lookup } = window.nuware.Actors
Node
const { hookup, lookup } = require('@nuware/actors')
or
import { hookup, lookup } from '@nuware/actors'
Exmaple
hookup('a', {
init: () => Promise.resolve(null),
onMessage: (data) => console.log('Data', data)
})
lookup('a').send({ text: 'text' })
License
MIT License
Author
Dmitry Dudin dima@nuware.ru
0.1.0
7 years ago