Wrap() constructor
Wrap()
Wrap()Creates a new instance of the Wrap with the opening and closing.
constructor(opening: Opening, closing: Closing) {
super(Wrap.template`${opening}${closing}`);
this.#closing = closing;
this.#opening = opening;
}Parameters
Returns
The return value is a new instance of Wrap with the primitive value of the provided opening and closing if set properly, otherwise with an empty string.
Usage
// Example usage.
import { Wrap } from '@angular-package/text';
// Returns Wrap{'[]'}
new Wrap('[', ']');
// Returns Wrap{''}
new Wrap(null as any, null as any);Last updated
Was this helpful?