Skip to content

Commit

Permalink
WIP2
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Sep 9, 2024
1 parent 55b0733 commit 917201e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commitlint/fpHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export class OptionStatic {
export class TypeHelpers {
// because instanceof doesn't work with primitive types (e.g. String), taken from https://stackoverflow.com/a/58184883/544947
public static IsInstanceOf(variable: any, type: any) {
if (variable === null) {
throw new Error ("Invalid parameter passed in: null");
}
let res: boolean = false;
if (typeof type == "string") {
res = typeof variable == type.toLowerCase();
Expand Down

0 comments on commit 917201e

Please sign in to comment.