UNPKG

@ably/chat

Version:

Ably Chat is a set of purpose-built APIs for a host of chat features enabling you to create 1:1, 1:Many, Many:1 and Many:Many chat rooms for any scale. It is designed to meet a wide range of chat use cases, such as livestreams, in-game communication, cust

7 lines (6 loc) 265 B
/** * Generates a random string that can be used as an identifier, for instance, in identifying specific room * objects. * @returns A random string that can be used as an identifier. */ export const randomId = (): string => Math.random().toString(36).slice(2);