Skip to content

Globals

Globals object is used to store and manage properties in the global store.

Basic Usage

import { globals } from "@dirigible/core";
import { response } from "@dirigible/http";


globals.set("attr1", "value1");
let attr = globals.get("attr1");

response.println("[Attribute]: " + attr);
response.flush();
response.close();
const globals = require("core/globals");
const response = require("http/response");

globals.set("attr1", "value1");
let attr = globals.get("attr1");

response.println("[Attribute]: " + attr);
response.flush();
response.close();

Functions


Function Description Returns
get(key) Returns the value per key from the global parameters string
set(key, value) Sets the value per key to the global parameters -