MCPcopy Create free account
hub / github.com/Effect-TS/effect / searchLast

Function searchLast

packages/effect/src/ConfigProvider.ts:1147–1150  ·  view source on GitHub ↗
(str: string, rgx: RegExp)

Source from the content-addressed store, hash-verified

1145}
1146
1147function searchLast(str: string, rgx: RegExp): number {
1148 const matches = Array.from(str.matchAll(rgx))
1149 return matches.length > 0 ? matches.slice(-1)[0].index : -1
1150}
1151
1152/**
1153 * Creates a `ConfigProvider` by reading and parsing a `.env` file from the

Callers 1

interpolateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected