char/avril

(wip) why'd you have to go and make things so complicaaaaated?

git clone https://git.t4t.associates/char/avril

Charlotte Somport path extension to typescript38d5bbf

main
617 B24 linesraw
1import { ObjectFreeze } from "ext:core/primordials";
2import { posixBase, win32Base } from "./lexical.js";
3import {
4  posixFromFileUrl,
5  posixToFileUrl,
6  win32FromFileUrl,
7  win32ToFileUrl,
8} from "./urls.js";
9
10// Both variant namespaces are built once here so every entry module shares
11// their identity; wrappers only re-export them and the chosen top-level names.
12const posix = ObjectFreeze({
13  ...posixBase,
14  fromFileUrl: posixFromFileUrl,
15  toFileUrl: posixToFileUrl,
16});
17
18const win32 = ObjectFreeze({
19  ...win32Base,
20  fromFileUrl: win32FromFileUrl,
21  toFileUrl: win32ToFileUrl,
22});
23
24export { posix, win32 };