This commit is contained in:
zznty
2024-06-02 21:49:11 +07:00
parent 4146027cb7
commit 529fe260da
585 changed files with 1685 additions and 1214 deletions

View File

@@ -0,0 +1,12 @@
/**
* Checks whether the entire input sequence can be matched
* against the regular expression.
* @return {boolean}
*/
export default function matchesEntirely(text, regular_expression) {
// If assigning the `''` default value is moved to the arguments above,
// code coverage would decrease for some weird reason.
text = text || '';
return new RegExp('^(?:' + regular_expression + ')$').test(text);
}
//# sourceMappingURL=matchesEntirely.js.map