0.3.3 • Published 6 years ago

really-basic-chat-ui v0.3.3

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

really-basic-chat-ui

A minimal command line chat UI. Used by local-network-chat and p2p-local-network-chat.

screenshot

npm version ISC-licensed chat on gitter support me on Patreon

Installing

npm install really-basic-chat-ui

Usage

const createUI = require('really-basic-chat-ui')

const send = (msg) => {
	// …
}

const render = createUI(send)
render(true, [
	{from: 'someone', when: 1507404635951, content: 'beep'},
	{from: 'someone else', when: 1507404635951, content: 'boop', sending: true}
], null)

API

createUI(sendFn) // -> render
render(isOpen, messages, err)

Contributing

If you have a question or have difficulties using really-basic-chat-ui, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.