Getting paginated results from REST API with continuation token

Posted this here:

Can anyone recommend a strategy in Node for retrieving the full list of results from the REST API with continuation token using recursive fetch?