Comparing version 1.1.2 to 2.0.0
The MIT License (MIT) | ||
Copyright (c) 2017 Alex Corvi | ||
Copyright (c) 2020 Alex Corvi | ||
@@ -22,2 +22,1 @@ Permission is hereby granted, free of charge, to any person obtaining a copy | ||
SOFTWARE. | ||
101
package.json
{ | ||
"name": "anchorme", | ||
"version": "1.1.2", | ||
"description": "A library to convert URLs to a clickable HTML anchor elements", | ||
"main": "./dist-node/index.js", | ||
"types": "./dist-node/index.d.ts", | ||
"scripts": { | ||
"test": "jest", | ||
"bench": "node benchmark/bench", | ||
"build": "node build/build", | ||
"prepublish": "npm run test && npm run bench && npm run build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/alexcorvi/anchorme.js.git" | ||
}, | ||
"keywords": [ | ||
"text", | ||
"to", | ||
"anchor", | ||
"tags" | ||
], | ||
"author": "Alex Corvi <alex@arrayy.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/alexcorvi/anchorme.js/issues" | ||
}, | ||
"homepage": "http://alexcorvi.github.io/anchorme.js/", | ||
"devDependencies": { | ||
"@types/jest": "^19.2.2", | ||
"jest": "^19.0.2", | ||
"rollup": "^0.41.6", | ||
"rollup-plugin-buble": "^0.15.0", | ||
"rollup-plugin-commonjs": "^8.0.2", | ||
"ts-jest": "^19.0.7", | ||
"typescript": "^2.2.2", | ||
"uglify-js": "^2.8.21" | ||
}, | ||
"dependencies": {}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js" | ||
], | ||
"transform": { | ||
"\\.(ts)$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": ".*spec\\.(ts|js)$", | ||
"globals": { | ||
"__TS_CONFIG__": { | ||
"module": "commonjs" | ||
} | ||
} | ||
} | ||
"name": "anchorme", | ||
"version": "2.0.0", | ||
"description": "A library to convert URLs to a clickable HTML anchor elements", | ||
"main": "./dist/node/index.js", | ||
"types": "./dist/node/index.d.ts", | ||
"scripts": { | ||
"test": "mocha", | ||
"testw": "mocha -w", | ||
"build": "./node_modules/.bin/ts-node ./build/build.ts", | ||
"buildw": "./node_modules/.bin/ts-node ./build/build.ts -w", | ||
"update-tlds": "./node_modules/.bin/ts-node build/tlds/update.ts", | ||
"server": "./node_modules/.bin/lite-server" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/alexcorvi/anchorme.js.git" | ||
}, | ||
"keywords": [ | ||
"text", | ||
"to", | ||
"anchor", | ||
"tags" | ||
], | ||
"author": "Alex Corvi <alex@arrayy.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/alexcorvi/anchorme.js/issues" | ||
}, | ||
"homepage": "http://alexcorvi.github.io/anchorme.js/", | ||
"devDependencies": { | ||
"@rollup/plugin-buble": "^0.21.1", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@types/expect": "^24.3.0", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node-fetch": "^2.5.5", | ||
"@types/uglify-js": "^3.0.4", | ||
"chokidar": "^3.3.1", | ||
"expect": "^25.2.3", | ||
"lite-server": "^2.5.4", | ||
"mocha": "^7.1.1", | ||
"node-fetch": "^2.6.0", | ||
"rollup": "^2.2.0", | ||
"ts-node": "^8.8.1", | ||
"typescript": "^3.8.3", | ||
"uglify-js": "^3.8.0" | ||
}, | ||
"dependencies": {} | ||
} |
# 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) | ||
@@ -9,41 +13,21 @@ ![npm](https://img.shields.io/npm/v/anchorme.svg) | ||
[![Documentation](http://puu.sh/ukS4g/ccc520ade4.jpg)](http://alexcorvi.github.io/anchorme.js/) | ||
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](http://alexcorvi.github.io/anchorme.js/) | ||
## What's Included | ||
## 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) | ||
* __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 | ||
- **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](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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108013
874
15
19
33
1
1