---
title: "TextWhizzHelper | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/TextWhizzHelper/"
---

# TextWhizzHelper

> Compares two positions.

## Functions

### comparePositions()

```ts
function comparePositions(p0, p1): any;
```

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `p0` | `TextPosition` | first position. |
| `p1` | `TextPosition` | second position. |

#### Returns

`any`

true if the positions match, false otherwise.

***

### compareRanges()

```ts
function compareRanges(sel0, sel1): any;
```

Compares two ranges.

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `sel0` | `TextRange` | first range. |
| `sel1` | `TextRange` | second range. |

#### Returns

`any`

true if the ranges match, false otherwise.
