# x-equal

> Tiny library for comparing strings

Latest version **0.0.3** (published 2021-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install x-equal
pnpm add x-equal
yarn add x-equal
bun add x-equal
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-10-06 |
| First published | 2021-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jotaajunior |

## Links

- npm: https://www.npmjs.com/package/x-equal
- Repository: https://github.com/jotaajunior/x-equal
- npm.io page: https://npm.io/package/x-equal

## Dependencies (1)

- [lodash.deburr](https://npm.io/package/lodash.deburr.md) ^4.1.0

## Recent versions

- 0.0.3 (latest) — 2021-10-06
- 0.0.2 — 2021-10-04
- 0.0.1 — 2021-10-04

## README

# x-equal

![](https://img.shields.io/badge/license-MIT-green)
[![codecov](https://codecov.io/gh/jotaajunior/x-equal/branch/main/graph/badge.svg?token=M86BS18SI2)](https://codecov.io/gh/jotaajunior/x-equal)

> Tiny library for comparing if strings are equal.

I got myself rewriting this code again and again in projects, so decided to move the code to its own package.

## Install

```
$ yarn add x-equal
```

## Usage

### Import

```ts
import { isEqual } from 'x-equal'
```

### Comparing strings

```ts
isEqual('hello', 'hello') // Same as 'hello' === 'hello'
```

### Comparing strings (insensitive)

Compare strings ignoring string case, for example: `HeLlO` will be equal to `hello`.

```ts
isEqual('hello', 'hello', {
  isSensitive: false,
})
```

### Comparing strings (remove special characters)

Compare strings ignoring diacritical marks (', ^, etc.), this uses [`lodash.deburr`](https://www.npmjs.com/package/lodash.deburr).

```ts
isEqual('João', 'joao', {
  deburr: false,
})
```

---

<div align="center">
  Made with ❤ by <a href="https://github.com/jotaajunior">Jota</a>.
</div>

---
_Source: https://npm.io/package/x-equal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
