chore: adding in more comments

This commit is contained in:
BluJ
2022-07-18 13:37:52 -06:00
parent 17d4b8048f
commit 5b4a2257c7

View File

@@ -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)) {