# anchorme

> A library to convert URLs to a clickable HTML anchor elements

Latest version **3.0.8** (published 2024-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install anchorme
pnpm add anchorme
yarn add anchorme
bun add anchorme
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.8 |
| Published | 2024-04-08 |
| First published | 2016-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 114 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 570 |
| Author | Alex Corvi |
| Maintainers | alexcorvi |
| Keywords | text, to, anchor, tags |

## Links

- npm: https://www.npmjs.com/package/anchorme
- Repository: https://github.com/alexcorvi/anchorme.js
- Homepage: http://alexcorvi.github.io/anchorme.js/
- Issues: https://github.com/alexcorvi/anchorme.js/issues
- npm.io page: https://npm.io/package/anchorme

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 3.0.8 (latest) — 2024-04-08
- 3.0.7 — 2024-04-08
- 3.0.6 — 2024-04-07
- 3.0.5 — 2023-05-24
- 3.0.4 — 2023-04-04
- 3.0.3 — 2023-04-04
- 3.0.2 — 2023-04-04
- 2.1.2 — 2020-05-08
- 2.1.1 — 2020-05-08
- 2.1.0 — 2020-05-08
- 2.0.0 — 2020-04-03
- 1.1.2 — 2017-04-06
- 1.1.1 — 2017-04-06
- 1.1.0 — 2017-04-05
- 1.0.5 — 2017-04-05
- … 12 more at https://npm.io/package/anchorme/versions

## README

# Anchorme.js

[![Documentation](http://puu.sh/ukS4g/ccc520ade4.jpg)](http://alexcorvi.github.io/anchorme.js/)
[Getting Started, Documentations, Demos and more](http://alexcorvi.github.io/anchorme.js/)

![npm](https://img.shields.io/npm/dm/anchorme.svg)
![npm](https://img.shields.io/npm/v/anchorme.svg)
![GitHub release](https://img.shields.io/github/release/alexcorvi/anchorme.js.svg)
![license](https://img.shields.io/github/license/alexcorvi/anchorme.js.svg)

Tiny, fast, efficient, feature rich Javascript library to detect links / URLs / Emails in text and convert them to clickable HTML anchor links.

## Main features

-   **Sensitivity**:
    -   It's Highly sensitive with the least false positives.
    -   It validates URLs and Emails against full IANA list.
    -   Validates port numbers (if present).
    -   Validates IP octet numbers (if present).
    -   Works on non latin alphabets URLs.
-   **Robustness**:
    -   Skips HTML, so it doesn't break your HTML if it had a URL as an attribute for an element, or a link that is already inside an anchor.
    -   Links with or without protocols.
    -   Works with IPs, FTPs, Emails and files.
    -   Can detect parenthesis and quotation marks as part of the URL or as a surrounding to the URL.
    -   Easily extensible with your own code (e.g. for hashtags and mentions).
-   **Fast**: Performance is one of the main things that were kept in mind while writing this library.
    -   It's incredibly fast since 99% of all the heavy lifting is based on a single optimized regular expression.
    -   Processing H.G. Wells novel, the time machine, took only 2.2 milliseconds on my machine.
    -   This library is also a lot faster than other alternatives (linkify & autolinker). [Link to benchmark](https://alexcorvi.github.io/anchorme.js/benchmark.html)
-   **Light Weight**: Although it's a feature rich library with a full IANA list included, it's only **9KB** when minified and GZipped.

---

-   [React component by Pavel Potáček](https://github.com/potty/react-anchorme)

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