/alks.js

JavaScript client for the ALKS API, usable in both modern browsers and node.js

Primary LanguageJavaScriptMIT LicenseMIT

alks.js

Build Status Coverage Status Requirements Status File Size npm version

JavaScript client for the ALKS API, usable in both modern browsers and node.js

It provides a lightweight wrapper around the ALKS REST API, with the following features:

  • No dependencies in browser, only one dependency in node.js
  • Implemented with promises, leveraging fetch instead of XMLHttpRequest
  • Promises reject with ALKS-provided status messages when available
  • Each method returns only the appropriate data from the API response
  • Fully documented with JSDoc
  • Works with no polyfills in latest Chrome, Firefox and Safari

For browser usage, it expects fetch (and Promises) to be available. If they're not, you'll need to polyfill them.

Documentation

View the API documentation

To update the API documentation from the source, run npm run docs

Tests

Run both node.js and browser tests with npm test (must have Chrome installed)