@aero/xkcd

Aero's implementation of the xkcd API.

Usage no npm install needed!

<script type="module">
  import aeroXkcd from 'https://cdn.skypack.dev/@aero/xkcd';
</script>

README

Aero XKCD wrapper

Aero's implementation of the xkcd API using @aero/centra

Usage

const { XKCDClient } = require('@aero/xkcd');

const xkcd = new XKCDClient(); // optional: { cacheLifetime: number }; in ms
// Get a random comic
xkcd.random(): Promise<XKCDComic>

// Get a comic by ID
xkcd.id(id: number): Promise<XKCDComic>