Formerly tricycle/elm-eventstream. Search finds this package by either name.
Keep track of a stream of events and set triggers that send out outgoing events.
Currently in use by us to supply the Google Tag Managers Data Layer with safely encoded events.
Create an EventStream
Attempt to add a new event to the EventStream
The minimal expected structure of an event needs to look like;
{ "eventName": "YourEventName",
"eventData": "Data for which you supply a decoder that confirms it's validity and match"
}Get RawIncomingEvents that match query from the eventStream
Add a trigger to the EventStream
A structured error describing why your mutation to the EventStream failed. You can use this to give feedback to the developer who might be adding an unknown or misformed event.
Convert an EventStream error into a String that is nice for debugging.
The Matcher is currently an alias for the Core String type.
The Matcher allows for more advanced, event specific triggers to be set.
You might have an event A that contains a field name on which you want to place a specific trigger.
This could then look like A.someValue.
Please refer to the tests included for more examples
The EventStream holds the possible eventNames and matchers, triggers for outgoing events and ofcourse every past events