UNPKG
lean4-code-actions
Version:
latest (1.1.32)
1.1.32
Refactorings and snippets for Lean 4
lean4-code-actions
/
libs
/
utils
/
node.ts
9 lines
(5 loc)
•
284 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{ basename }
from
'path'
import
{ fileURLToPath,
URL
}
from
'url'
export
const
get__filename = fileURLToPath
export
const
get__basename
= (
url
:
string
| URL
) =>
basename
(
fileURLToPath
(url))
export
const
get__dirname
= (
url
:
string
| URL
) =>
fileURLToPath
(
new
URL
(
'.'
, url))