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

Function result

packages/sql/pg/src/PgAuth.ts:39–46  ·  view source on GitHub ↗
(evaluate: () => A)

Source from the content-addressed store, hash-verified

37}
38
39const result = <A>(evaluate: () => A): Result.Result<A, AuthError> => {
40 try {
41 return Result.succeed(evaluate())
42 } catch (error) {
43 if (error instanceof AuthError) return Result.fail(error)
44 throw error
45 }
46}
47
48const textEncoder = new TextEncoder()
49const textDecoder = new TextDecoder("utf-8", { fatal: true })

Callers 4

md5PasswordFunction · 0.70
scramInitFunction · 0.70
scramContinueFunction · 0.70
scramFinishFunction · 0.70

Calls 3

failMethod · 0.65
evaluateFunction · 0.50
succeedMethod · 0.45

Tested by

no test coverage detected