MCPcopy
hub / github.com/remotely-save/remotely-save / simpleTransRemotePrefix

Function simpleTransRemotePrefix

src/fsS3.ts:162–177  ·  view source on GitHub ↗
(x: string)

Source from the content-addressed store, hash-verified

160////////////////////////////////////////////////////////////////////////////////
161
162export const simpleTransRemotePrefix = (x: string) => {
163 if (x === undefined) {
164 return "";
165 }
166 let y = path.posix.normalize(x.trim());
167 if (y === undefined || y === "" || y === "/" || y === ".") {
168 return "";
169 }
170 if (y.startsWith("/")) {
171 y = y.slice(1);
172 }
173 if (!y.endsWith("/")) {
174 y = `${y}/`;
175 }
176 return y;
177};
178
179export const DEFAULT_S3_CONFIG: S3Config = {
180 s3Endpoint: "",

Callers 1

displayMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected