isWrapped()
The method checks whether the primitive value of the specified object is wrapped by the opening and closing chars of an instance or given opening and closing chars.
Wrap.prototype.isWrapped()
Wrap.prototype.isWrapped()public isWrapped(
opening: string = this.#opening,
closing: string = this.#closing
): boolean {
return this.hasOpening(opening) && this.hasClosing(closing);
}Parameters
opening: string = this.#opening
opening: string = this.#openingclosing: string = this.#closing
closing: string = this.#closingReturns
Example usage
Basic
Given opening
openingGiven closing
closingGiven opening and closing chars
opening and closing charsLast updated