1.0.17 • Published 10 years ago

haiku-xmpp v1.0.17

Weekly downloads
1
License
MIT
Repository
github
Last release
10 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

10 years ago

1.0.16

10 years ago

1.0.15

10 years ago

1.0.14

10 years ago

1.0.13

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago