MCPcopy
hub / github.com/axios/axios / makeSocketPath

Function makeSocketPath

tests/unit/adapters/http.test.js:6533–6539  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6531
6532 describe('socketPath security', () => {
6533 function makeSocketPath() {
6534 const pipe = `axios-socketpath-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
6535
6536 return os.platform() === 'win32'
6537 ? `\\\\.\\pipe\\${pipe}`
6538 : path.join(os.tmpdir(), `${pipe}.sock`);
6539 }
6540
6541 function startUnixServer(socketPath, onRequest) {
6542 return new Promise((resolveStart, rejectStart) => {

Callers 1

http.test.jsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected