mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 02:11:56 +00:00
chore: adding in more comments
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user