got
Version:
Human-friendly and powerful HTTP request library for Node.js
18 lines (14 loc) • 397 B
TypeScript
export default function isUnixSocketURL(url: URL): boolean;
/**
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;