TraitUtil
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
staticsafeArray
Parameters
value: any
A value to potentially convert into a safe array.
Returns any[]
staticsafeName
Provides a utility method that defers to
object.name
if it exists or fallback todefaultName
oranonymous
.Parameters
object: any
The target object to provide safe name coverage.
defaultName: string = ""
A default name to fallback to if
object.name
is missing.
Returns string
staticsafeValue
Provides a utility method that defers to
object.value
if it exists or fallback todefaultValue
oranonymous
.Parameters
object: any
The target object to provide safe name coverage.
defaultValue: string = ""
A default value to fallback to if
object.value
is missing.
Returns string
Provides safe array creation from a given input.