utils

Methods

(inner) getKeyByValue(object, value) → {string}

O(n) function to get the key from a value returns the first key that has the value

Source:
Parameters:
Name Type Description
object object

the object to use

value string

an ISO6392 language code

Returns:
Type:
string

an _ language code string

(inner) getObjectFromObjectArray(array, value) → {string}

O(n*2) function to get an object holding a value from an array of objects returns the first object that has the value or an empty object if all fails

Source:
Parameters:
Name Type Description
array array

an array of objects

value string

an ISO6392 language code

Returns:
Type:
string

an _ language code string

(inner) isValueInObject(object, value) → {Bool}

Source:
Parameters:
Name Type Description
object object
value *

a value the object holds/can hold

Returns:
Type:
Bool

Whether or not the value is in the object

(inner) mergeObjects(f, s) → {object}

merge two objects not associative mergeobjects(x,v) !== mergeobjects(v,x)

Source:
Parameters:
Name Type Description
f object

first object

s object

second object

Returns:
Type:
object

the result of merging the two objects