aboutsummaryrefslogtreecommitdiffstats
path: root/config/fileURLToDirname.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/fileURLToDirname.js')
-rw-r--r--config/fileURLToDirname.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/fileURLToDirname.js b/config/fileURLToDirname.js
new file mode 100644
index 0000000..70654cb
--- /dev/null
+++ b/config/fileURLToDirname.js
@@ -0,0 +1,10 @@
1import { dirname } from 'path';
2import { fileURLToPath } from 'url';
3
4/**
5 * @param {string} url
6 * @returns {string}
7 */
8export default function fileURLToDirname(url) {
9 return dirname(fileURLToPath(url));
10}