Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anchorme

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchorme

A library to convert URLs to a clickable HTML anchor elements

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
73K
increased by4.15%
Maintainers
1
Weekly downloads
 
Created
Source

Anchorme.js

npm npm GitHub release license David David

Documentation

Tiny, fast, efficient, feature rich Javascript library to detect links / URLs / Emails in text and convert them to clickable HTML anchor links.

Getting Started, Documentations, Demos and more

What's Included

  • 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)
  • Robustness:
    • Skips HTML, so it doesn't break your HTML if it had a URL as an attribute for an element.
    • 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.
  • Fast: It's definitely fast! processing H.G. Wells The Time Machine novel with over 1500 URLs inserted at random places takes only 3.5 seconds.
  • Light Weight: Although it's a feature rich library with a full IANA list included, it's only 6KB when minified and gzipped.

Contributing

This project is written in Typescript and compiled to JavaScript.

Prerequisites:

  • Typescript installed globally
  • Jest installed globally (for testing)

How to contribute

  • Clone this repository
  • cd anchorme.js && npm install
  • ..
  • Add unit tests if needed
  • Run npm run test for testing
  • Run npm run build for building

License: The MIT License (MIT) - Copyright (c) 2017 Alex Corvi

Keywords

FAQs

Package last updated on 03 Mar 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc