Aberdeen - v1.9.0
    Preparing search index...

    Module aberdeen

    Interfaces

    PromiseProxy

    When proxy is called with a Promise, the returned object has this shape.

    Variables

    cssVars

    A reactive object containing CSS variable definitions.

    NO_COPY

    A symbol that can be added to an object to prevent it from being cloned by clone or copy. This is useful for objects that should be shared by reference. That also mean that their contents won't be observed for changes.

    Functions

    $

    The core function for building reactive user interfaces in Aberdeen. It creates and inserts new DOM elements and sets attributes/properties/event listeners on DOM elements. It does so in a reactive way, meaning that changes will be (mostly) undone when the current scope is destroyed or will be re-execute.

    clean

    Registers a cleanup function to be executed just before the current reactive scope is destroyed or redraws.

    clone

    Clone an (optionally proxied) object or array.

    copy

    Recursively copies properties or array items from src to dst. It's designed to work efficiently with reactive proxies created by proxy.

    count

    Reactively counts the number of properties in an objects.

    darkMode

    Returns whether the user's browser prefers a dark color scheme.

    derive

    Creates a reactive scope that automatically re-executes the provided function whenever any proxied data (created by proxy) read during its last execution changes, storing its return value in an observable.

    disableCreateDestroy

    Make the create and destroy special properties no-ops.

    dump

    Renders a live, recursive dump of a proxied data structure (or any value) into the DOM at the current $ insertion point.

    insertCss

    Inserts CSS rules into the document, scoping them with a unique class name.

    insertGlobalCss

    Inserts CSS rules globally (unscoped).

    invertString

    Creates a new string that has the opposite sort order compared to the input string.

    isEmpty

    Reactively checks if an observable array or object is empty.

    map

    Reactively maps/filters items from a proxied source array or object to a new proxied array or object.

    merge

    Like copy, but uses merge semantics. Properties in dst not present in src are kept. null/undefined in src delete properties in dst.

    mount

    Attaches a reactive Aberdeen UI fragment to an existing DOM element. Without the use of this function, $ will assume document.body as its root.

    multiMap

    Reactively maps items from a source proxy (array or object) to a target proxied object, where each source item can contribute multiple key-value pairs to the target.

    onEach

    Reactively iterates over the items of an observable array or object, optionally rendering content for each item.

    partition

    Reactively partitions items from a source proxy (array or object) into multiple "bucket" proxies based on keys determined by a classifier function.

    peek

    Executes a function or retrieves a value without creating subscriptions in the current reactive scope, and returns its result.

    proxy

    Creates a reactive proxy around the given data.

    ref

    Creates a reactive reference ({ value: T }-like object) to a specific value within a proxied object or array.

    runQueue

    Forces the immediate and synchronous execution of all pending reactive updates.

    setErrorHandler

    Sets a custom error handler function for errors that occur asynchronously within reactive scopes (e.g., during updates triggered by proxy changes in derive or $ render functions).

    setSpacingCssVars

    Initializes cssVars[0] through cssVars[12] with an exponential spacing scale.

    unmountAll

    Removes all Aberdeen-managed DOM nodes and stops all active reactive scopes (created by mount, derive, $ with functions, etc.).

    unproxy

    Returns the original, underlying data target from a reactive proxy created by proxy. If the input target is not a proxy, it is returned directly.