Utilities

Various utilities and helpers.


# download(impUrl) => Promise<ohq.Module> · <>

  • impUrl: Full url to Obaservable HQ notebook as a string.
  • returns: Returns a Promise of a notebook (a JSON object).

Downloads a notebook directly from Observable HQ as a JSON object. The following example downloads the @observablehq/plot notebook as JSON:


# ojs2notebook(ojs) => ohq.Module · <>

  • ojs: String containing Observable JavaScript.
  • returns: Returns the notebook as a JSON object.

Transforms Observable JavaScript to a JSON notebook.

# omd2notebook(omd) => ohq.Module · <>

  • omd: String containing Observable Markdown.
  • returns: Returns the notebook as a JSON object.

Transforms Observable Markdown to a JSON notebook.