Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/worker/project/pathkey.ts?format=json
24 linesFirst import 100%Last change First import in version 0, 1 version changed it
1// The key paths match by (#49, the rulings on case and Unicode):
2// two spellings are one file when their keys are equal. It's Unicode's
3// canonical caseless match, used only to compare, never to rename: the
4// canonical decomposition (NFD), case folding, then NFD again. JavaScript has
5// no case-folding call, so upper-then-lower case stands in for it; unlike
6// lower case alone, it folds ß to ss as case folding does.
7//
8// The engine (V8 on Workers) and the client (Node) must build the same key,
9// so the client imports this file rather than writing its own. Both take
10// their Unicode data from their ICU; `unicodeVersion` says which, and a
11// mismatch can only matter for characters assigned after the older one.
13export function pathKey(path: string): string {
14 return path.normalize("NFD").toUpperCase().toLowerCase().normalize("NFD");
17/** Whether a path is in composed form (NFC), the form most tools on Windows and Linux expect. */
18export function isComposed(path: string): boolean {
19 return path === path.normalize("NFC");
22/** The Unicode version this runtime's data is from, where the runtime says. */
23export const unicodeVersion: string | undefined = (globalThis as { process?: { versions?: { unicode?: string } } })
24 .process?.versions?.unicode;