Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/commons/IpcUtils.ts
1028 views
1
import * as os from 'os';
2
import { v1 as uuidv1 } from 'uuid';
3
4
export function createIpcSocketPath(name: string): string {
5
if (os.platform() === 'win32') {
6
return `\\\\.\\pipe\\${name}`;
7
}
8
return `${os.tmpdir()}/${name}.sock`;
9
}
10
11
export function createId(): string {
12
return uuidv1();
13
}
14
15