MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / matchFirst

Function matchFirst

packages/node-core/src/integrations/context.ts:425–428  ·  view source on GitHub ↗

* Executes a regular expression with one capture group. * * @param regex A regular expression to execute. * @param text Content to execute the RegEx on. * @returns The captured string if matched; otherwise undefined.

(regex: RegExp, text: string)

Source from the content-addressed store, hash-verified

423 * @returns The captured string if matched; otherwise undefined.
424 */
425function matchFirst(regex: RegExp, text: string): string | undefined {
426 const match = regex.exec(text);
427 return match ? match[1] : undefined;
428}
429
430/** Loads the macOS operating system context. */
431async function getDarwinInfo(): Promise<OsContext> {

Callers 2

context.tsFile · 0.85
getDarwinInfoFunction · 0.85

Calls 1

execMethod · 0.80

Tested by

no test coverage detected