Static methods
The static methods of `Wrap` the string object.
Last updated
Was this helpful?
The static methods of `Wrap` the string object.
Last updated
Was this helpful?
Wrap.isWrap()
The method checks if the value of any type is the instance of any or given opening and closing.
Opening extends string
Closing extends string
value: any
The value of any type to test against the Wrap
instance of any or given opening and closing.
opening?: Opening
An optional wrap opening to check if the given value
contains.
closing?: Closing
An optional wrap closing to check if the given value
contains.
value is Wrap<Opening, Closing>
Wrap.template()
template: TemplateStringsArray
...values: string[]
A generic type variable constrained by the , by default of the value captured from the provided wrap
indicates the Opening
type of the instance via the return type.
A generic type variable constrained by the , by default of the value captured from the provided wrap
indicates the Closing
type of the instance via the return type.
The return type is a boolean
indicating the value
parameter is an instance of that takes a generic type variable Opening
and Closing
.
The return value is a type indicating whether the value is an instance of Wrap
of any or given opening and closing.
The static "tag" method builds the wrap of a type on the template. With the added string before the expressions, it returns a wrapped string.
An array
of string
values where the first element is a text between and .
A rest parameter of expressions, where the first element is the and the second is the of the wrap.
The return value is a the wrap, or an empty string
if elements of the provided values
are not string
.