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

Function url

packages/effect/src/internal/config.ts:194–204  ·  view source on GitHub ↗
(name?: string)

Source from the content-addressed store, hash-verified

192
193/** @internal */
194export const url = (name?: string): Config.Config<URL> => {
195 const config = primitive(
196 "an URL property",
197 (text) =>
198 Either.try({
199 try: () => new URL(text),
200 catch: (_) => configError.InvalidData([], `Expected an URL value but received ${formatUnknown(text)}`)
201 })
202 )
203 return name === undefined ? config : nested(config, name)
204}
205
206/** @internal */
207export const port = (name?: string): Config.Config<number> => {

Callers

nothing calls this directly

Calls 2

primitiveFunction · 0.85
formatUnknownFunction · 0.85

Tested by

no test coverage detected