unsplash / pipe-ts

33 stars 4 forks source link

Suggestion: pipeWith to use curried format #10

Open finnmerlett opened 3 years ago

finnmerlett commented 3 years ago

I like the syntactic sugar of pipeWith, as it follows more logically in my head (and also nicely emulates the way RxJs does things). That said, I feel like the distinction between the first parameter and the rest could be made clearer by changing the format to

pipeWith(dataIn)(
  fn1,
  fn2,
  fn3
) // etc

Alternatively, you could add it with a different name like pipeFrom to avoid it being a breaking change.