hasText()
Wrap.prototype.hasText()
Wrap.prototype.hasText()public hasText(text?: string): boolean {
return (
this.#text.length >= 1 &&
(typeof text === 'string' ? this.#text === text : true)
);
}Parameters
text?: string
text?: stringReturns
Example usage
// Example usage.
import { Wrap } from '@angular-package/wrapper';
// Returns true.
new Wrap(`[`, `]`, 'quote').hasText();
// Returns false.
new Wrap(`[`, `]`).hasText();
// Returns false.
new Wrap(`[`, `]`, '').hasText();Given text
textLast updated