1.0.17 • Published 8 years ago

haiku-xmpp v1.0.17

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Haiku

An FRP XMPP library built on Bacon.js and Strophe

npm install haiku-xmpp

Currently this installs the source which is in ES6 and will require browserify/babel for use in browsers.

Haiku is a modern wrapper around Strophe that simplifies usage greatly, particularly when used in reactive UIs.

It handles all the callback mechanisms internally, and exposes a surface built entirely on Promises and Bacon.js streams.

Connecting to the server and listening for chats is as simple as:

var HaikuConnection = require('haiku-xmpp').HaikuConnection;
new HaikuConnection(username, password, xmpp_server)
  .then(haiku => haiku.createChatStream());

This creates a Bacon.js stream that has all of the standard features.

And of course, it works brilliantly with ES6 yield:

var HaikuConnection = require('haiku-xmpp').HaikuConnection;
var haiku = yield new HaikuConnection(username, password, xmpp_server);
haiku.createChatStream().onValue(v => //do stuff when chat is received );
haiku.createPresenceStream().onValue(v => //do stuff when a contact's status changes ); 

Testing

Tests use karma and phantom js.

npm install
bower install
npm test OR grunt [creates file watcher for continuous testing]
1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago