Wrapper

The Wrapper is an extension of the Wrap object, which means it represents the immutable wrap of the opening and closing with the additional main ability to use it to wrap string. It can also define the wrap in a restricted characters range.

Instance accessors

NameDescription

The get accessor, with the help of toStringTag, changes the default tag to 'wrapper' in the Wrapper instance.

Static methods

Wrapper.Description

Defines a new Wrapper instance consisting of the allowed opening and closing.

Gets the allowed characters of the AllowedChars type from the static Wrapper.

Gets an instance of Wrap stored in the static Wrapper.

The method checks if the value of any type is an instance of the Wrapper.

The method sets the default pattern of allowed characters for static Wrapper.

Sets a new instance of Wrap into the static Wrapper.

The static method wraps the specified text with a stored Wrap instance in the static Wrapper or with a given wrap.

Instance methods

Wrapper.prototype.Description

The method checks if the provided text is wrapped with the wrap of the specified Wrapper object.

Checks if the provided text has a closing of the specified Wrapper object.

Checks if the provided text has an opening of the specified Wrapper object.

Returns the unwrapped text, without the opening and closing of the Wrapper.

Wraps specific text with the wrap, the opening, and closing of the Wrapper object.

Last updated