Home Reference Source Test Repository
import Dacho from 'dacho/src/Dacho.js'
public class | source

Dacho

Dacho key/value object generator to be unique value

Constructor Summary

Public Constructor
public

constructor(globalPrefix: string)

Constructor

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

react(keys: Object | string[], prefix: string): Object

react

public

Validator for keys

public

Validator for prefix

Public Constructors

public constructor(globalPrefix: string) source

Constructor

Params:

NameTypeAttributeDescription
globalPrefix string

prefix for every key

Public Members

public globalPrefix: string source

public registered: string[] source

Public Methods

public react(keys: Object | string[], prefix: string): Object source

react

Params:

NameTypeAttributeDescription
keys Object | string[]

keys

prefix string

prefix for value

Return:

Object

public validateKeys(keys: Object | string[]): string[] source

Validator for keys

Params:

NameTypeAttributeDescription
keys Object | string[]

keys

Return:

string[]

Throw:

Error

throw error when keys is not array of string

public validatePrefix(prefix: string): string source

Validator for prefix

Params:

NameTypeAttributeDescription
prefix string

prefix

Return:

string

Throw:

Error

throw error when prefix is not string