---
title: Context
summary: Class in @sascom/commonjs.
order: 10
languages: [javascript]
sdk-package: JavaScript · @sascom/commonjs
---

# Context

[[page:reference/javascript/api|API catalogue]] · `@sascom/commonjs` · Class

````typescript sdk=js sdk-namespace="@sascom/commonjs"
class Context
````

The shared runtime context of the common library: its worker pool and WebAssembly modules

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/sascom-commonjs/context-fa688a6c#member-constructor-9c7943913043|constructor]] | Method |  |
| [[page:reference/javascript/sascom-commonjs/context-fa688a6c#member-setupmodules-95017cef3fcf|setupModules]] | Method | Starts the workers and loads the WebAssembly modules (zstd, xxh64, roaring, ...); idempotent |
| [[page:reference/javascript/sascom-commonjs/context-fa688a6c#member-get-8efed39cd505|get]] | Method | The shared context, created on first use |

## `constructor` {#member-constructor-9c7943913043}

````typescript sdk=js sdk-namespace="@sascom/commonjs"
constructor()
````



## `setupModules` {#member-setupmodules-95017cef3fcf}

````typescript sdk=js sdk-namespace="@sascom/commonjs"
setupModules(): Promise<void>
````

Starts the workers and loads the WebAssembly modules (zstd, xxh64, roaring, ...); idempotent

## `get` {#member-get-8efed39cd505}

````typescript sdk=js sdk-namespace="@sascom/commonjs"
static get(): Context
````

The shared context, created on first use
