From 5b4a2257c7908b2db6124026b1c256f0469c925c Mon Sep 17 00:00:00 2001 From: BluJ Date: Mon, 18 Jul 2022 13:37:52 -0600 Subject: [PATCH] chore: adding in more comments --- emver-lite/mod.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emver-lite/mod.ts b/emver-lite/mod.ts index 73e1ab3..8e94bcd 100644 --- a/emver-lite/mod.ts +++ b/emver-lite/mod.ts @@ -248,6 +248,9 @@ export class Checker { public readonly check: (value: string | EmVer) => boolean, ) {} + /** + * Used when we want the `and` condition with another checker + */ public and(...others: (Checker | string)[]): Checker { return new Checker((value) => { if (!this.check(value)) { @@ -262,6 +265,9 @@ export class Checker { }); } + /** + * Used when we want the `or` condition with another checker + */ public or(...others: (Checker | string)[]): Checker { return new Checker((value) => { if (this.check(value)) {