Socket
Socket
Sign inDemoInstall

anchorme

Package Overview
Dependencies
0
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anchorme

A library to convert URLs to a clickable HTML anchor elements


Version published
Weekly downloads
41K
decreased by-6.24%
Maintainers
1
Install size
120 kB
Created
Weekly downloads
 

Readme

Source

Anchorme.js

Documentation Getting Started, Documentations, Demos and more

npm npm GitHub release license David David

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.
    • Processing H.G. Wells novel, the time machine, took only 100 milliseconds.
    • This library is also faster than other alternatives (linkify & autolinker). Link to benchmark
  • Light Weight: Although it's a feature rich library with a full IANA list included, it's only 9KB when minified and GZipped.

Keywords

FAQs

Last updated on 08 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc