got
Version:
Human-friendly and powerful HTTP request library for Node.js
17 lines (13 loc) • 337 B
TypeScript
/**
Extract the socket path from a UNIX socket URL.
@example
```
getUnixSocketPath(new URL('http://unix/foo:/path'));
//=> '/foo'
getUnixSocketPath(new URL('unix:/foo:/path'));
//=> '/foo'
getUnixSocketPath(new URL('http://example.com'));
//=> undefined
```
*/
export declare function getUnixSocketPath(url: URL): string | undefined;