isWrapped()
isWrapped(opening, closing)
isWrapped(opening, closing)// Examples without the text.
// Return `false` because there is no text to wrap.
new Wrapper('{{{', '}}}').isWrapped();
// Return `false` because there is no text to wrap.
new Wrapper('{{{', '}}}', '').isWrapped());
// Return `false` because there is no text to wrap.
new Wrapper('', '}}}').isWrapped();
// Return `false` because there is no text to wrap.
new Wrapper('{{{', '').isWrapped();
// Examples with the text.
// Returns `true`.
new Wrapper('{{{', '}}}', 'wrap me').isWrapped();
// Returns `false` because the opening chars is an empty `string`.
new Wrapper('', '}}}', 'wrap me').isWrapped();
// Returns `false` because the closing chars is an empty `string`.
new Wrapper('{{{', '', 'wrap me').isWrapped();
Conclusion
Last updated