Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@nju33/hai

0.2.1 • Public • Published

 Hai

XO code style Build Status Dependencies Status

✋ A small conversation library that happens at hand

Hai

Install, or Download

npm

$ npm i -S @nju33/hai

yarn

$ yarn add @nju33/hai

bower

$ bower i -S hai

Download

Access to releases page. Then, download the latest version.

Usage

Bandler

(e.g.) webpack, browserify, rollup...

// es
import Hai from '@nju33/hai';
// common
const Hai = require('@nju33/hai');

Browser

<script src="/path/to/hai.js"></script>
<script>// Your JS code.</script> 

API

hai = new Hai(talks)

Create an instance of Hai that Contains information about talk elements or callbacks. It can be used by passing it to openWith.

Hai.config

Hai.config.theme

Dark(default) or light.

talk.name

Use for prefix of callback name.

talk.message

What I'd like to talk about here.

talk.convenient

talk.convenient.type

Various types. (e.g. text, input, radio, checkbox)
Note that property values that you have to pass depend on type change

type: text

Please write the text you want displayed in the text property. This is used when you want to display longer text.

type: radio or type: checkbox

Please write the text you want displayed in the items property. Use this if you want to give the client choices.

This is the only difference.

  • radio
    Select only one.
  • checkbox
    Multiple selection.

TODO....

type: input

TODO...

hai.open

TODO...

hai.open.then(answers => ...);

LICENSE

The MIT License (MIT)

Copyright (c) 2016 nju33

Install

npm i @nju33/hai

DownloadsWeekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • avatar