Skip to content

Commit 3c4ee8f

Browse files
authored
feat: added RegExp#test method
1 parent 4fae9af commit 3c4ee8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assembly/regexp.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ export class RegExp {
166166
return null;
167167
}
168168

169+
test(str: string): bool {
170+
return this.exec(str) != null;
171+
}
172+
169173
toString(): string {
170174
return this.regex;
171175
}

0 commit comments

Comments
 (0)