Static methods
Public
Wrapped.isWrapped()
Wrapped.isWrapped()
The static method checks whether the provided value
of any type is an instance of Wrapped
.
Text extends string
Opening extends string
Closing extends string
Parameters
value: any
opening?: Opening
An optional opening of the wrap
to check if the given value
contains.
closing?: Closing
An optional closing of the wrap
to check if the given value
contains.
Returns
value is Wrapped<Text, Opening, Closing>
The return value is a boolean
indicating whether the value is the Wrapped
instance of any or given wrap.
Example usage
Wrapped.template()
Wrapped.template()
The static "tag" method builds the wrapped text of a string
type on the template literal. It consists of a text
and an instance of Wrap
.
Parameters
template: TemplateStringsArray
An array of string
values where the first element is a text between opening and closing.
...values: any[]
Returns
The return value is a string
the wrapped text, or an empty string
if elements of the provided values
are not string
.
Example usage
Last updated