timdp / swirly

A marble diagram generator.
https://swirly.dev
MIT License
117 stars 3 forks source link

Make toOperatorSpec and toStreamSpec part of public API #7

Closed sengmann closed 3 years ago

sengmann commented 4 years ago

It would be nice to be able to access the two functions mentioned in the title as part of the public interface. I have written a small library to use your project to generate diagrams in Unit Tests.

timdp commented 4 years ago

Love the library. It actually looks a lot like the feature that @niklas-wortmann removed from the RxJS repo when introducing Swirly there.

I'll look into exposing the factory functions in a consistent manner. Might end up changing the API a little bit. I'll keep you posted!

timdp commented 3 years ago

Well, that took me longer than expected. However, as of v0.15.0, the parser package exports the functions you need. They've been renamed but the signature hasn't changed:

export {
  parseMarbleDiagramSpecification,
  createDiagramSpecification,
  createOperatorSpecification,
  createStreamSpecification
}