import {Stream} from 'most'
import MulticastSource from './MulticastSource'

function multicast (stream) {
  const source = stream.source
  return source instanceof MulticastSource
    ? stream
    : new Stream(new MulticastSource(source))
}

export {multicast as default, MulticastSource}

import MulticastSource from './MulticastSource'

function multicast (stream) {
  const source = stream.source
  return source instanceof MulticastSource
    ? stream
    : new stream.constructor(new MulticastSource(source))
}

export {multicast as default, MulticastSource}

Break dep cycle, allow most to use mostjs/multicast
Break dep cycle, allow most to use mostjs/multicast
