UNPKG
@hey-api/json-schema-ref-parser
Version:
latest (1.2.1)
1.2.1
1.2.0
1.1.0
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
0.0.2
0.0.1
Parse, Resolve, and Dereference JSON Schema $ref pointers
heyapi.dev
hey-api/json-schema-ref-parser
@hey-api/json-schema-ref-parser
/
lib
/
util
/
convert-path-to-posix.ts
12 lines
(8 loc)
•
284 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
path
from
"path"
;
export
default
function
convertPathToPosix
(
filePath: string
) {
const
isExtendedLengthPath = filePath.
startsWith
(
"\\\\?\\"
);
if
(isExtendedLengthPath) {
return
filePath; }
return
filePath.
split
(path?.
win32
?.
sep
).
join
(path?.
posix
?.
sep
??
"/"
); }