MCPcopy Index your code
hub / github.com/bugy/script-server / isFullRegexMatch

Function isFullRegexMatch

web-src/src/common/utils/common.js:718–731  ·  view source on GitHub ↗
(regex, value)

Source from the content-addressed store, hash-verified

716}
717
718export function isFullRegexMatch(regex, value) {
719 let fullStringPattern = regex
720
721 if (!fullStringPattern.startsWith('^')) {
722 fullStringPattern = '^' + fullStringPattern
723 }
724
725 if (!fullStringPattern.endsWith('$')) {
726 fullStringPattern += '$'
727 }
728
729 const regexPattern = new RegExp(fullStringPattern)
730 return regexPattern.test(value)
731}

Callers

nothing calls this directly

Calls 1

testMethod · 0.80

Tested by

no test coverage detected