Skip to content

Commit 579ef52

Browse files
docs(Wrap): update.
1 parent a8d13c6 commit 579ef52

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/lib/wrap.class.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
2-
* The `Wrap` object represents the immutable text wrapped by the opening and closing chars. It is designed to preserve the names of the
3-
* opening, text and closing.
2+
* The `Wrap` object is based on the `String` object and represents the immutable primitive value of the text wrapped by the opening and
3+
* closing chars. It is designed to preserve the type names of the supplied opening, text, and closing chars by using the generic type
4+
* variables.
45
*/
56
export class Wrap<
67
Opening extends string = string,
@@ -53,15 +54,15 @@ export class Wrap<
5354
#closing: Closing;
5455

5556
/**
56-
* Private property of text of a generic type variable `Text`.
57+
* Private property of the opening chars of a generic type variable `Opening`.
5758
*/
58-
#text: Text;
59+
#opening: Opening;
5960

6061
/**
61-
* Private property of the opening chars of a generic type variable `Opening`.
62+
* Private property of text of a generic type variable `Text`.
6263
*/
63-
#opening: Opening;
64-
//#endregion instance private properties.
64+
#text: Text;
65+
//#endregion instance private properties.
6566

6667
//#region static public methods.
6768
/**
@@ -173,8 +174,8 @@ export class Wrap<
173174
/**
174175
* Checks whether the primitive value of a specified object has the closing chars or given closing chars. An empty `string` indicates
175176
* `undefined`.
176-
* @param closing Optional closing chars of a `string` type to check whether the primitive value contains them at the end.
177-
* @returns The return value is a `boolean` indicating whether the primitive value has the closing chars.
177+
* @param closing Optional closing chars of a `string` type to check whether the primitive value contains them at the **end**.
178+
* @returns The return value is a `boolean` indicating whether the primitive value has the closing chars or given closing chars.
178179
* @angularpackage
179180
*/
180181
public hasClosing(closing?: string): boolean {
@@ -187,8 +188,8 @@ export class Wrap<
187188
/**
188189
* Checks whether the primitive value of a specified object has the opening chars or given opening chars. An empty `string` indicates
189190
* `undefined`.
190-
* @param opening Optional opening chars of a `string` type to check if the primitive value contains them at the beginning.
191-
* @returns The return value is a `boolean` indicating whether the primitive value has the opening chars.
191+
* @param opening Optional opening chars of a `string` type to check if the primitive value contains them at the **beginning**.
192+
* @returns The return value is a `boolean` indicating whether the primitive value has the opening chars or given `opening` chars.
192193
* @angularpackage
193194
*/
194195
public hasOpening(opening?: string): boolean {
@@ -202,7 +203,7 @@ export class Wrap<
202203
* The method checks whether the text of a specified `Wrap` object is defined, which means it's a `string` of at least one char and
203204
* optionally equal to the given `text`.
204205
* @param text Optional text of `string` type to check whether it's equal to the text of the `Wrap` object.
205-
* @returns The return value is a `boolean` indicating whether the text is defined and equal to the optionally given text.
206+
* @returns The return value is a `boolean` indicating whether the text is defined and optionally equal to the given text.
206207
* @angularpackage
207208
*/
208209
public hasText(text?: string): boolean {
@@ -214,10 +215,11 @@ export class Wrap<
214215

215216
/**
216217
* The method checks whether the primitive value of the specified object is wrapped by the opening and closing chars of an instance or
217-
* given opening and closing chars.
218-
* @param opening Optional opening chars of a `string` type to check if the text contains them at the beginning.
219-
* @param closing Optional closing chars of a `string` type to check if the text contains them at the end.
220-
* @returns The return value is a `boolean` indicating whether the object has both opening and closing chars.
218+
* given `opening` and `closing` chars.
219+
* @param opening Optional opening chars of a `string` type to check if the primitive value contains them at the beginning.
220+
* @param closing Optional closing chars of a `string` type to check if the primitive value contains them at the end.
221+
* @returns The return value is a `boolean` indicating whether the object has both opening and closing chars or given `opening` and
222+
* `closing` chars.
221223
* @angularpackage
222224
*/
223225
public isWrapped(

0 commit comments

Comments
 (0)