MCPcopy Index your code
hub / github.com/Effect-TS/effect / parseInt

Function parseInt

packages/effect/test/Effect/mapping.test.ts:11–17  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

9const ExampleError = new Error("Oh noes!")
10
11const parseInt = (s: string): number => {
12 const n = Number.parseInt(s)
13 if (Number.isNaN(n)) {
14 throw new Cause.IllegalArgumentException()
15 }
16 return n
17}
18
19const fib = (n: number): number => {
20 if (n <= 1) {

Callers 9

defaultIntProcessorFunction · 0.85
handleProcessIntegerFunction · 0.85
parseSetCookieFunction · 0.85
w3cFunction · 0.85
Number.tsFile · 0.85
parseEventStreamLineFunction · 0.85
encodeHexBytesFunction · 0.85
Client.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected