Wrap

The Wrap object represents the immutablearrow-up-right text wrapped by the opening and closing chars. It is designed to preserve the names of the opening, text and closing.

Instance accessors

Wrap.prototype.
Decription

The getarrow-up-right accessor gets the closing of the wrap by returning the #closing property of a specified object.

The getarrow-up-right accessor gets the content of the Wrap by returning the #content property of a specified object.

The getarrow-up-right accessor gets the opening of the wrap by returning the #opening property of a specified object.

The getarrow-up-right accessor gets the text of the Wrap by returning the #text property of a specified object.

The getarrow-up-right accessor, with the help of toStringTagarrow-up-right of Symbol, changes the default object tag to wrap for an instance of the Wrap.

Static methods

Wrap.
Description

Checks whether the text has opening chars at the beginning.

Checks whether the text has given closing chars at the end.

The method checks whether the value of any type is the Wrap instance of any or given opening and closing chars.

Instance methods

Wrap.prototype.
Description

Gets the closing chars of the wrap by returning the #closing property of a specified object.

Gets the opening chars of the wrap by returning the #opening property of a specified object.

Gets the text of the wrap by returning the #text property of a specified object, without the opening and closing chars of the Wrap.

Checks whether the primitive value of a specified object has the closing chars or given closing chars.

Checks whether the primitive value of a specified object has the opening chars or given opening chars.

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 optionally equal to the given text.

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.

Returns the primitive value with replaced closing chars.

Returns the primitive value with replaced opening chars.

Returns the primitive value with replaced text.

Gets the wrap, the primitive value of a specified Wrap object.

Returns the wrap, primitive value of a specified Wrap object.

Last updated