mirror of https://github.com/certd/certd
13 lines
274 B
JavaScript
13 lines
274 B
JavaScript
![]() |
import os from 'os'
|
||
![]() |
export default {
|
||
|
join (...dirs) {
|
||
|
const url = new URL('../' + dirs.join('/'), import.meta.url)
|
||
![]() |
console.log('url', url)
|
||
![]() |
let path = url.pathname
|
||
|
if (os.type() === 'Windows_NT') {
|
||
|
path = path.substring(1)
|
||
|
}
|
||
|
return path
|
||
![]() |
}
|
||
|
}
|