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

Function fileToModuleName

packages/tools/utils/src/Codegen.ts:157–160  ·  view source on GitHub ↗
(posix: string)

Source from the content-addressed store, hash-verified

155 const toPosix = path.sep === "/" ? (file: string) => file : (file: string) => file.split(path.sep).join("/")
156
157 const fileToModuleName = (posix: string): string => {
158 const withoutExt = posix.slice(0, -path.extname(posix).length)
159 return withoutExt.replace(/\//g, "_")
160 }
161
162 const processModule = Effect.fn("processModule")(function*(directory: string, file: string) {
163 const fullPath = path.join(directory, file)

Callers 1

Codegen.tsFile · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected