Skip to content

expose() #32

@apademide

Description

@apademide
/**
 * Set a variable on the global object for debugging purposes, and returns the passed value.
 */
export function expose<T>(name: string, value: T, when: Value<boolean> = true): T {
  if (value(when)) {
    (globalThis as any)[name] = value;
  }

  return value;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚀 — FeatureAn entirely new feature that should be implemented.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions