Skip to content

event emission outside most/create closures and dropping support for most.create #1

@sourcevault

Description

@sourcevault

QUESTION 1

I know this must have been answered somewhere but ..

why is this an issue ?

(taken from @most/create)

// Unsupported:
let emitEvent, emitEnd, emitError

const stream = most.create((add, end, error) => {
  emitEvent = add
  emitEnd = end
  emitError = error
})

emitEvent(123)
emitEnd()

Is there something about lazy streams that makes supporting emission outside closures a bad idea ?

QUESTION 2

for most.create why is it a Backward compatible port

Backward compatible port of most.create as a separate package

  • Shouldnt the ablity to glue most into other systems in the wild be given core priority ?

  • most.fromEvent is quite limiting to the endless ways people expose events in the nodejs ecosystem.

  • For example my current project I am trying to expose operation system syscalls-

@most/create is intregal to that task, the idea that it might not be core to most worries me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions