Skip to content

Commit

Permalink
Add JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Jan 25, 2025
1 parent c22bb12 commit 7c12c81
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,17 @@ export interface URLRegExpOptions {
*/
trailingPeriod?: boolean;
}
/**
* Get the regular expression for the URLs.
* @param {URLRegExpOptions & { returnString?: false; }} [options={}] Options.
* @returns {RegExp}
*/
export function urlRegExp(options?: URLRegExpOptions & { returnString?: false; }): RegExp;
/**
* Get the regular expression source string for the URLs.
* @param {URLRegExpOptions & { returnString: true; }} options Options.
* @returns {string}
*/
export function urlRegExp(options: URLRegExpOptions & { returnString: true; }): string;
export function urlRegExp(options: URLRegExpOptions = {}): string | RegExp {
const {
Expand Down

0 comments on commit 7c12c81

Please sign in to comment.