Skip to content

Commit

Permalink
docs: internal comment for later
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael committed Oct 21, 2022
1 parent c046b23 commit 6524e0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import type { Methods } from "./types";
export const DOTENV_FILENAME = ".env";
export const DOTENV_LINE = new RegExp(/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/);

// support for any protocols to be used with the uri component
// currently only http and https are supported

// passing a string bypasses the protocol check and allows for any protocol to be used
// but when using the object, url.protocol only accepts http and https
export const PROTOCOL_REGEXP = new RegExp(/^(https|http)/i);
export const HOSTNAME_REGEXP = new RegExp(
/^(?:https?:\/\/)?(?:[^@\/\n]+@)?([^:\/\n]+)/i
Expand Down

0 comments on commit 6524e0f

Please sign in to comment.