ripcrypt/module/consts.mjs
2025-01-30 21:49:16 -07:00

17 lines
336 B
JavaScript

// MARK: filePath
export function filePath(path) {
if (path.startsWith(`/`)) {
path = path.slice(1);
};
return `systems/ripcrypt/${path}`;
};
// MARK: documentSorter
export function documentSorter(a, b) {
const sortDelta = b.sort - a.sort;
if (sortDelta !== 0) {
return sortDelta;
};
// TODO alphabetical sort
return 0;
};