Initial commit

This commit is contained in:
Brian McGonagill 2026-03-18 09:02:21 -05:00
commit b3a51a4115
10336 changed files with 2381973 additions and 0 deletions

View file

@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.segmentsToPathMapper = segmentsToPathMapper;
exports.segmentsToPathUnmapper = segmentsToPathUnmapper;
const globals_1 = require("../../../utils/globals");
function segmentsToPathMapper(segments) {
return (0, globals_1.safeJoin)((0, globals_1.safeMap)(segments, (v) => `/${v}`), '');
}
function segmentsToPathUnmapper(value) {
if (typeof value !== 'string') {
throw new Error('Incompatible value received: type');
}
if (value.length !== 0 && value[0] !== '/') {
throw new Error('Incompatible value received: start');
}
return (0, globals_1.safeSplice)((0, globals_1.safeSplit)(value, '/'), 1);
}