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

Function parseFdName

packages/effect/src/unstable/process/ChildProcess.ts:865–870  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

863 * @since 4.0.0
864 */
865export const parseFdName = (name: string): number | undefined => {
866 const match = /^fd(\d+)$/.exec(name)
867 if (match === null) return undefined
868 const fd = parseInt(match[1], 10)
869 return fd >= 3 ? fd : undefined
870}
871
872/**
873 * Create an fd name from its numeric index.

Callers

nothing calls this directly

Calls 1

execMethod · 0.80

Tested by

no test coverage detected