GithubHelp home page GithubHelp logo

hhhyyyy99 / anchorme.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexcorvi/anchorme.js

0.0 0.0 0.0 1.62 MB

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

Home Page: http://alexcorvi.github.io/anchorme.js/

License: MIT License

JavaScript 1.37% TypeScript 80.59% HTML 18.04%

anchorme.js's Introduction

Anchorme.js

Documentation Getting Started, Documentations, Demos and more

npm npm GitHub release license

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
  • Light Weight: Although it's a feature rich library with a full IANA list included, it's only 9KB when minified and GZipped.

anchorme.js's People

Contributors

alselawi avatar alexcorvi avatar ali-saleem avatar azagniotov avatar kmsheng avatar jessidhia avatar ionogy avatar harryburns avatar chrisoelmueller avatar davidschlachter avatar jack-works avatar sebamarynissen avatar faizanahemad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.