spamscanner / url-regex-safe

Regular expression matching for URL's. Maintained, safe, and browser-friendly version of url-regex. Resolves CVE-2020-7661 for Node.js servers.
https://forwardemail.net/docs/url-regex-javascript-node-js
MIT License
79 stars 16 forks source link

Added TypeScript instructions #16

Closed pjotrsavitski closed 2 years ago

pjotrsavitski commented 2 years ago

Updated README file to include instructions for using the package with TypeScript.

codecov-commenter commented 2 years ago

Codecov Report

Merging #16 (4f540e8) into master (fc0028a) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           22        22           
=========================================
  Hits            22        22           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fc0028a...4f540e8. Read the comment docs.

pjotrsavitski commented 2 years ago

Not sure why, but GitHub seems to be removing the closing part for the suggested multi line comment.

Uzlopak commented 2 years ago

Why not providing the d.ts folder in this repo and referencing it in the package.json in the typings attribute?

Then you would provide the typings automatically without the necessity to install another dependency and if the typings are incomplete or wrong we just have to change them in this package and not somewhere else.

Richienb commented 2 years ago

@Uzlopak Sometimes, a maintainer is not interested in maintaining their own type definitions. We can only speculate for now.

pjotrsavitski commented 2 years ago

It seems that closing code block is missing. Probably due to some changes during resolving code comments.