Module memory

Source
Expand description

Memory utilities

Functions§

bidgen

Return an id generator that returns bigint, starting from 1n, and will always return a new bigint

cell

A light weight storage wrapper around a value that can be subscribed to for changes

idgen

Returns an id generator that returns number staring from 1 and always increasing. The number could become inaccurate (not integer) when exceeding Number.MAX_SAFE_INTEGER (which is 2^53 - 1

makeEmpType

Create a factory function for an Emp type.

persist

Create a cell that persists its value to a web storage

safeidgen

Return an id generator that will generate ids in order from 1 to n, wrapping around to 1 when it's n

Interfaces§

Cell

See cell

CellConstructor

Args for constructing a cell

Emp

A non-null, Engine-managed Pointer

EmpConstructor

Args for constructing a Emp type

Persist

A cell that also persists its value.

PersistConstructor

Args for creating a persisted cell.

PersistStorage

Interface for Web Storage API used by persist.