explainxkcd

Gets explanation of XKCD Comics

Usage no npm install needed!

<script type="module">
  import explainxkcd from 'https://cdn.skypack.dev/explainxkcd';
</script>

README

Explain XKCD

To get the explanation of an XKCD, just pass in its number:

var explainxkcd = require("explainxkcd");
var comicNumber = 512;
explainxkcd(comicNumber, function(explanation) {
    console.log(explanation);
})

Or pass in several numbers:

var explainxkcd = require("explainxkcd");
comicNumbers = [12, 455, 199, 1513];
explainxkcd(comicNumbers, function(explanation) {
    console.log(explanation);
})

And the callback will be run for each comic separately.