(filePath: string)
| 39 | export const trimExtension = (filePath: string) => filePath.slice(0, -path.extname(filePath).length); |
| 40 | |
| 41 | export function formatPathToLuaPath(filePath: string): string { |
| 42 | filePath = filePath.replace(/\.json$/, ""); |
| 43 | if (process.platform === "win32") { |
| 44 | // Windows can use backslashes |
| 45 | filePath = filePath.replace(/\.\\/g, "").replace(/\\/g, "."); |
| 46 | } |
| 47 | return filePath.replace(/\.\//g, "").replace(/\//g, "."); |
| 48 | } |
| 49 | |
| 50 | type NoInfer<T> = [T][T extends any ? 0 : never]; |
| 51 |
no outgoing calls
no test coverage detected