npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jsjacts

v1.0.6

Published

JSJaC - JavaScript Jabber Client Library Used TypeScript========================================

Downloads

4

Readme

JSJaC - JavaScript Jabber Client Library

JSJaC is an XMPP (formerly known as Jabber) client library written in JavaScript to ease implementation of web based XMPP clients. For communication with an XMPP server it needs to support either HTTP Polling or XMPP Over BOSH (formerly known as HTTP Binding) or XMPP Over WebSocket. JSJaC has an object oriented interface which should be quite easy to use. Communication is done by using the HTTPRequest object (also refered to as AJAX technology) or WebSocket. Your browser must support this. JSJaC is fully compatible with all major JavaScript frameworks.

Note: As security restrictions of most modern browsers prevent HTTP Polling from being usable anymore this module is disabled by default now. If you want to compile it in use 'make polling'.

License

JSJaC is licensed under the terms of the Mozilla Public License version 1.1 or, at your option, under the terms of the GNU General Public License version 2 or subsequent, or the terms of the GNU Lesser General Public License version 2.1 or subsequent.

The complete text of each of these license can be found in the same directory as this file. See

  • MPL-1.1.txt - for version 1.1 of the Mozille Public License
  • gpl-2.0.txt - for version 2 of the GNU General Public License
  • lgpl-2.1.txt - for version 2.1 of the GNU Lesser General Public License

Build

In order to build a single compressed file to be included from within your app please run make at the top level directory of this project.

Hints on Usage

Service Address

Let's say your JSJaC based web application is located at http://example.com/. Your XMPP server is at jabber-example.com and it's HTTP Binding service is located at http://jabber-example.org:5280/ or https://jabber-example.org:5281/.

  • You could use mod_proxy and mod_rewrite to connect to jabber server:
    <VirtualHost *>
      Servername example.com
      DocumentRoot /var/www
      AddDefaultCharset UTF-8
      RewriteEngine On
      RewriteRule ^/http-bind/ http://jabber-example.com:5280/http-bind/ [P]
    </VirtualHost>

With this you'd end up having access to the Jabber server's service at http://example.com/http-bind/ (the httpbase address).

  • You could use cross domain requests directly to jabber server without any proxy server:
    var oDbg = new JSJaCConsoleLogger(3);
        
    var connector = new JSJaCHttpBindingConnection({
        oDbg: oDbg,
        httpbase: 'http://jabber-example.org:5280/http-bind/',
        timerval: 500
    });

More information: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing

Debug Logger

JSJaCConnection supports use of JSDebugger which is available separately.

JSJaC also ships with a class JSJaCConsoleLogger which lets you log to Firebug's and Safari's console.

Example

For an example on how to use this library within your web application please have to look at examples/simpleclient.html or examples/simpleCrossDomainClient.html.

Supported Browsers and Platforms

The following browsers are known to work with HTTP Binding. Let me know about others!

  • Microsoft Internet Explorer 6/7/8/9
  • Firefox 2.0.x and newer (and probably most other Gecko based browsers)
  • Opera 9 and newer
  • Chrome/Safari (and probably most other Webkit based browsers)

The following browsers are known to work with cross domain requests.

  • Internet Explorer 8 and newer
  • Opera 12 and newer
  • Firefox 3.5 and newer
  • Google Chrome 3 and newer

The following browsers are known to work with WebSocket.

  • Microsoft Internet Explorer 10
  • Firefox 16 and newer
  • Chrome 16 and newer
  • Opera 12.10, but will not work if a proxy is configured

Documentation

Documentation is provided by JSDoc under the docs/ subdirectory if you've downloaded JSJaC as a tarball. Otherwise you can generate it on your own by make doc.

There's also an online version available at http://sstrigler.github.com/JSJaC/.