Skip to content

ninchat/ninchat-js

Repository files navigation

JavaScript utilities for use with the Ninchat API.

Points of interest:

  • src/ninchatclient/ contains Go sources for NinchatClient, a library for accessing api.ninchat.com from a web browser, Node.js or React Native. It is a thin wrapper over the ninchat-go package (referenced as a Git submodule).

  • gen/ninchatclient.js contains JavaScript sources generated with GopherJS. Regenerate with make (requires Go). The latest stable version is available at https://ninchat.com/js/ninchatclient.js and https://ninchat.com/js/ninchatclient.min.js.

  • docs/ninchatclient.md contains API documentation.

  • example/client-test.js demonstrates usage.

NinchatClient supports IE8 and later, but the code generated by GopherJS requires ES5 and typed array shims. When WebSocket transport is not available, NinchatClient doesn't actually use the typed arrays, so stubs are enough.