MCPcopy
hub / github.com/browserless/browserless / normalizeFileProtocol

Function normalizeFileProtocol

src/utils.ts:85–93  ·  view source on GitHub ↗
(filepath: string)

Source from the content-addressed store, hash-verified

83 * @returns The normalized file path.
84 */
85export const normalizeFileProtocol = (filepath: string) => {
86 if (isWin) {
87 if (filepath.startsWith('file:///')) return filepath;
88
89 return 'file:///' + filepath;
90 }
91
92 return filepath;
93};
94
95/**
96 * Generates a random, Chromium-compliant page ID with "BLESS"

Callers 2

startMethod · 0.85
importDefaultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected