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

Function url

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

Source from the content-addressed store, hash-verified

183
184/** @internal */
185export const url = (name?: string): Config.Config<URL> => {
186 const config = primitive(
187 "an URL property",
188 (text) =>
189 Either.try({
190 try: () => new URL(text),
191 catch: (_) => configError.InvalidData([], `Expected an URL value but received ${formatUnknown(text)}`)
192 })
193 )
194 return name === undefined ? config : nested(config, name)
195}
196
197/** @internal */
198export 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