Sha256: 2d670afca3bd112e47654d341192238654971100cfe76a829781124ff327b17d
Contents?: true
Size: 526 Bytes
Versions: 57
Compression:
Stored size: 526 Bytes
Contents
let consumer export async function getConsumer() { return consumer || setConsumer(createConsumer().then(setConsumer)) } export function setConsumer(newConsumer) { return consumer = newConsumer } export async function createConsumer() { const { createConsumer } = await import(/* webpackChunkName: "actioncable" */ "@rails/actioncable/src") return createConsumer() } export async function subscribeTo(channel, mixin) { const { subscriptions } = await getConsumer() return subscriptions.create(channel, mixin) }
Version data entries
57 entries across 57 versions & 3 rubygems