项目
在 GitHub 查看
alexcorvi/anchorme.js
关于
小巧、快速、高效且功能丰富的 JavaScript 库,可检测文本中的链接、URL 和电子邮件地址,并将其转换为可点击的 HTML 锚点链接。
网站与应用开发可以做什么
- 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).
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Anchorme.js
Getting Started, Documentations, Demos and more
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.
探索相关项目
加载中…