# Overview

## Wrap {}

The [`Wrap`](https://github.com/angular-package/wrapper/blob/main/src/lib/wrap.class.ts) object is based on the [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) object and represents the [immutable](https://developer.mozilla.org/en-US/docs/Glossary/Immutable) [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of the [text](https://wrapper.angular-package.dev/getting-started/basic-concepts#wrap-content) wrapped by the [opening](https://wrapper.angular-package.dev/getting-started/basic-concepts#opening) and [closing](https://wrapper.angular-package.dev/getting-started/basic-concepts#closing) chars. It is designed to preserve the type names of the supplied opening, text, and closing chars by using the generic type variables.

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#string_primitives_and_string_objects>" %}

{% embed url="<https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html>" %}

## Instance

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="accessors/closing"><strong>closing</strong></a><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor gets the <a href="../../getting-started/basic-concepts#closing">closing</a> of the wrap by returning the <a href="properties/closing"><code>#closing</code></a> property of the specified object.</p>                                                                                                                                                                                                     |
| <p><a href="accessors/opening"><strong>opening</strong></a><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor gets the <a href="../../getting-started/basic-concepts#opening">opening</a> of the wrap by returning the <a href="properties/opening"><code>#opening</code></a> property of the specified object.</p>                                                                                                                                                                                                     |
| <p><a href="accessors/text">t<strong>ext</strong></a><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor gets the text of the <a href=""><code>Wrap</code></a> by returning the <a href="properties/text"><code>#text</code></a> property of a specified object.</p>                                                                                                                                                                                                                                                     |
| <p><a href="accessors/symbol.tostringtag"><strong>\[Symbol.toStringTag]</strong></a><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag"><code>toStringTag</code></a> of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol"><code>Symbol</code></a> changes the default tag <code>String</code> of the instance to the custom tag <code>Wrap</code>.</p> |

### Properties

|                                                                                                                                                                                                                      |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="properties/closing"><strong>#closing</strong></a><br>Private property of the closing chars of a generic type variable <a href="../generic-type-variables#wrap-closing"><code>Closing</code></a>.</p>     |
| <p><a href="properties/opening"><strong>#opening</strong></a><br>Private property of the opening chars of a generic type variable <a href="../generic-type-variables#wrap-opening"><code>Opening</code></a>.</p>     |
| <p><a href="properties/text"><strong>#text</strong></a><br>Private property of text of a generic type variable <a href="../generic-type-variables#wrap-less-than...-text-...greater-than"><code>Text</code></a>.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="methods/instance/getclosing"><strong>getClosing()</strong></a><br>Gets the <a href="../../getting-started/basic-concepts#closing">closing</a> chars of the wrap by returning the <a href="../properties#closing-closing"><code>#closing</code></a> property of a specified object.</p>                                                                                                                                                                                                                                      |
| <p><a href="methods/instance/getopening"><strong>getOpening()</strong></a><br>Gets the <a href="../../getting-started/basic-concepts#opening">opening</a> chars of the wrap by returning the <a href="../properties#opening-opening"><code>#opening</code></a> property of a specified object.</p>                                                                                                                                                                                                                                      |
| <p><a href="methods/instance/gettext"><strong>getText()</strong></a><br>Gets the text of the wrap by returning the <a href="properties/text"><code>#text</code></a> property of a specified object, without the <a href="accessors/opening">opening</a> and <a href="accessors/closing">closing</a> chars of the <a href="overview"><code>Wrap</code></a>.</p>                                                                                                                                                                          |
| <p><a href="methods/instance/hasclosing"><strong>hasClosing()</strong></a><br>Checks whether the <a href="methods/instance/valueof">primitive value</a> of a specified object has the <a href="accessors/closing"><code>closing</code></a> chars or given <a href="../methods/instance/hasclosing#closing-string"><code>closing</code></a> chars.</p>                                                                                                                                                                                   |
| <p><a href="methods/instance/hasopening"><strong>hasOpening()</strong></a><br>Checks whether the <a href="methods/instance/valueof">primitive value</a> of a specified object has the <a href="accessors/opening"><code>opening</code></a> chars or given <a href="../methods/instance/hasopening#opening-string"><code>opening</code></a> chars.</p>                                                                                                                                                                                   |
| <p><a href="methods/instance/hastext"><strong>hasText()</strong></a><br>The method checks whether the <a href="accessors/text"><code>text</code></a> of a specified <a href=""><code>Wrap</code></a> object is defined, which means it's a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>string</code></a> of at least one char and optionally equal to the given <a href="../methods/instance/hastext#text-string"><code>text</code></a>.</p>                                |
| <p><a href="methods/instance/iswrapped"><strong>isWrapped()</strong></a><br>The method checks whether the <a href="methods/instance/valueof">primitive value</a> of the specified object is wrapped by the <a href="accessors/opening">opening</a> and <a href="accessors/closing">closing</a> chars of an instance or given <a href="../methods/instance/iswrapped#opening-string-this.-opening"><code>opening</code></a> and <a href="../methods/instance/iswrapped#closing-string-this.-closing"><code>closing</code></a> chars.</p> |
| <p><a href="methods/instance/replaceclosing"><strong>★ replaceClosing()</strong></a><br>Returns the <a href="methods/instance/valueof">primitive value</a> with replaced <a href="accessors/closing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                                                                                |
| <p><a href="methods/instance/replaceopening"><strong>★ replaceOpening()</strong></a><br>Returns the <a href="methods/instance/valueof">primitive value</a> with replaced <a href="accessors/opening"><code>opening</code></a> chars.</p>                                                                                                                                                                                                                                                                                                |
| <p><a href="methods/instance/replacetext"><strong>★ replaceText()</strong></a><br>Returns the <a href="methods/instance/valueof">primitive value</a> with replaced <a href="accessors/text"><code>text</code></a>.</p>                                                                                                                                                                                                                                                                                                                  |
| <p><a href="methods/instance/tostring"><strong>toString()</strong></a><br>Gets the <a href="../../getting-started/basic-concepts#wrap">wrap</a>, the <a href="methods/instance/valueof">primitive value</a> of a specified <a href="#wrap"><code>Wrap</code></a> object.</p>                                                                                                                                                                                                                                                            |
| <p><a href="methods/instance/valueof"><strong>valueOf()</strong></a><br>Returns the <a href="../../getting-started/basic-concepts#wrap">wrap</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href=""><code>Wrap</code></a> object.</p>                                                                                                                                                                                             |

## Static

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><a href="methods/static/hasclosing"><strong>hasClosing()</strong></a><br>Checks whether the <a href="../methods/static/hasclosing#text-string"><code>text</code></a> has given <a href="../methods/static/hasclosing#closing-string"><code>closing</code></a> chars at the end.</p>                                                                                                                                         |
| <p><a href="methods/static/hasopening"><strong>hasOpening()</strong></a><br>Checks whether the <a href="../methods/static/hasopening#text-string"><code>text</code></a> has given <a href="../methods/static/hasopening#opening-string"><code>opening</code></a> chars at the beginning.</p>                                                                                                                                   |
| <p><a href="methods/static/iswrap"><strong>isWrap()</strong></a><br>The method checks whether the <a href="../methods/static/iswrap#value-any"><code>value</code></a> of any type is the <a href="#wrap"><code>Wrap</code></a> instance of any or given <a href="../methods/static/iswrap#opening-opening"><code>opening</code></a> and <a href="../methods/static/iswrap#closing-closing"><code>closing</code></a> chars.</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wrapper.angular-package.dev/wrap/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
