Home Reference Source
import Data from '~/models/Data.js'
public class | source

Data

Manages data passed from server-side

Constructor Summary

Public Constructor
public

constructor(dataId: string)

Member Summary

Public Members
public get

JS server data exchange identification.

Method Summary

Public Methods
public

Gets base64 json for key

public

envValueForKey(key: string): any

Obtains a server-sources env value

public

Check if key exists

public

Get value for key

Public Constructors

public constructor(dataId: string) source

Params:

NameTypeAttributeDescription
dataId string

name of meta data-id tag.

Public Members

public get dataId: string source

JS server data exchange identification.

Public Methods

public encodedJSONForKey(key: string): Object source

Gets base64 json for key

Params:

NameTypeAttributeDescription
key string

Key name

Return:

Object (nullable: true)

public envValueForKey(key: string): any source

Obtains a server-sources env value

Params:

NameTypeAttributeDescription
key string

The key

Return:

any (nullable: true)

null if not found

public hasKey(key: string): boolean source

Check if key exists

Params:

NameTypeAttributeDescription
key string

Return:

boolean

true if exists

public valueForKey(key: string): string source

Get value for key

Params:

NameTypeAttributeDescription
key string

Key name

Return:

string (nullable: true)