Skip to content

derhuerst/really-basic-chat-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.