Roam Client

A utility library filled with various methods for common operations used by extensions.

Introduction

Roam Client is a library filled with various common queries, DOM manipulation, write operations and so much more. They are methods that are commonly used throughout several RoamJS extensions and have been abstracted out for other Roam developers to use as well.
To start using the package, simply install from npm:
npm install roam-client
The library is open source and freely available on GitHub.

Table of Contents

The library is extensive. To mitigate the size, the available methods could be broken down into the following sections, which correspond to which file they are defined in:
  • Queries - Common Roam Datalog queries abstracted into human-readable typed helpers.
  • Writes - Helper methods for creating, updating, and deleting Roam blocks.
  • Dom - Utilities for observing and manipulating the Roam DOM.
  • Date - Helper methods for playing with dates in a Roam-specific way.
  • Events - Methods related to listening to Roam events.
  • Types - Typescript types defined and used within the package
  • Client - A typed REST client for interacting with the Roam API. Note that the Roam backend API is not yet public and therefore these methods could only be used on experimental graphs.
  • General - Other common RoamJS methods that did not fit into one of the above categories.