Sha256: 6866ba36fe5a3aad229493f15fd18597ee4abbc7378f2bf706027cabf8b0f551

Contents?: true

Size: 256 Bytes

Versions: 2

Compression:

Stored size: 256 Bytes

Contents

// frontend/client/cable.js
import cable from "actioncable";

let consumer;

function createChannel(...args) {
  if (!consumer) {
    consumer = cable.createConsumer();
  }

  return consumer.subscriptions.create(...args);
}

export default createChannel;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tractor_beam-0.1.4 templates/cable_js
tractor_beam-0.1.2 templates/cable_js