iketari / superchat

The Chat project
4 stars 1 forks source link

Учебный проект. Чат

Build Status devDependencies Status dependencies Status

Production

https://superchat-production.firebaseapp.com/

Stage

https://components-e2e6e.firebaseapp.com/

Разработка

Modules

Router : Router

Simple router based on HTML5 History API

utils
AvatarService

Service for getting users avatars in chat

ChatService

Service of chat functionality. Provide sending and polling of messages.

HttpService

Service for making of http requests

Mixins

Emitter : Emitter

This provides methods used for event handling. It's not meant to be used directly.

Typedefs

ChatData : Object
ChatMessage : Object

Router : Router

Simple router based on HTML5 History API

Router~{Router}

Kind: inner class of Router

Router~node : HTMLElement

Kind: inner property of Router

Router~history : History

Kind: inner property of Router

Router~routes : Object

Kind: inner property of Router

Router~route(path, view)

Register the view for the path

Kind: inner method of Router
Access: public

Param Type
path string
view BaseView

Router~start()

Start listening popstate event and clicks on links into the node

Kind: inner method of Router
Access: public

Router~go(path) ⇒ boolean

Switch route to the path

Kind: inner method of Router
Returns: boolean - - is route exists
Access: public

Param Type
path string

utils

utils~deepEqual(src, dest) ⇒ boolean

Сравнивает объекты по значниию

Kind: inner method of utils

Param Type
src Object
dest Object

utils~capitalize(str) ⇒ string

Поднимает первую букву строки в верхний регистр

Kind: inner method of utils

Param Type
str string

AvatarService

Service for getting users avatars in chat

ChatService

Service of chat functionality. Provide sending and polling of messages.

exports.ChatService ⏏

Kind: Exported class
Mixes: Emitter

exports.ChatService.symbol

Link for symbol for storign callbacks

Kind: instance property of exports.ChatService
Mixes: symbol

exports.ChatService.apply(recipient)

Method for apply mixin to the recipient

Kind: instance method of exports.ChatService
Mixes: apply

Param Type Description
recipient * object to install functionality

exports.ChatService~setUserName(name)

Kind: inner method of exports.ChatService
Access: public

Param Type Description
name string set username field

HttpService

Service for making of http requests

Emitter : Emitter

This provides methods used for event handling. It's not meant to be used directly.

Kind: global mixin

Emitter.symbol

Link for symbol for storign callbacks

Kind: static property of Emitter

Emitter.apply(recipient)

Method for apply mixin to the recipient

Kind: static method of Emitter

Param Type Description
recipient * object to install functionality

ChatData : Object

Kind: global typedef
Properties

Name Type Description
user string имя текущего пользователя
messages Array.<ChatMessage> масси сообщений в чате

ChatMessage : Object

Kind: global typedef
Properties

Name Type Description
text string Текст сообщения
name string имя отправителя сообщения