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.nameif it exists or fallback todefaultNameoranonymous.Parameters
object: any
The target object to provide safe name coverage.
defaultName: string = ""
A default name to fallback to if
object.nameis missing.
Returns string
staticsafeValue
Provides a utility method that defers to
object.valueif it exists or fallback todefaultValueoranonymous.Parameters
object: any
The target object to provide safe name coverage.
defaultValue: string = ""
A default value to fallback to if
object.valueis missing.
Returns string
Provides safe array creation from a given input.