UNPKG

@apidevtools/json-schema-ref-parser

Version:

Parse, Resolve, and Dereference JSON Schema $ref pointers

11 lines (8 loc) 253 B
const win32Sep = "\\"; export default function convertPathToPosix(filePath: string) { const isExtendedLengthPath = filePath.startsWith("\\\\?\\"); if (isExtendedLengthPath) { return filePath; } return filePath.split(win32Sep).join("/"); }