Skip to content

Commit

Permalink
replace Promise with async
Browse files Browse the repository at this point in the history
  • Loading branch information
busma13 committed Sep 24, 2024
1 parent 4e18bcd commit 2c299ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/teraslice-messaging/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import os from 'node:os';
import url from 'node:url';
import { nanoid } from 'nanoid';

export function newMsgId(): Promise<string> {
return new Promise((resolve) => {
const id = nanoid(10);
resolve(id);
});
export async function newMsgId(): Promise<string> {
return nanoid(10);
}

export function formatURL(hostname: string, port: number): string {
Expand Down

0 comments on commit 2c299ce

Please sign in to comment.