Home Intro Source Mebo GitHub
import Settings from 'mebo/src/Settings.js'
public class | source

Settings

Provides access to the general configuration used across Mebo.

const Mebo = require('mebo');

// listing the available settings
console.log(Mebo.Settings.keys());

Static Method Summary

Static Public Methods
public static

get(key: string, defaultValue: *): *

Returns the value assigned for the key

public static

has(key: string): boolean

Returns a boolean telling if the input key is under the arbitrary data

public static

Returns the keys included under the settings

public static

set(key: string, value: *)

Sets a value based on key & value under the settings

Static Public Methods

public static get(key: string, defaultValue: *): * source

Returns the value assigned for the key

Params:

NameTypeAttributeDescription
key string

name of the key

defaultValue *
  • optional

optional value returned when the key is not assigned

Return:

*

public static has(key: string): boolean source

Returns a boolean telling if the input key is under the arbitrary data

Params:

NameTypeAttributeDescription
key string

key name

Return:

boolean

public static keys(): Array<string> source

Returns the keys included under the settings

Return:

Array<string>

public static set(key: string, value: *) source

Sets a value based on key & value under the settings

Params:

NameTypeAttributeDescription
key string

name of the key

value *

value for the key