Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 07 20:08

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 07 20:08

    staltz on master

    chore(deps): bump ini from 1.3.… (compare)

  • May 07 20:08
    staltz closed #322
  • May 07 19:58

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 07 19:58

    staltz on master

    chore(deps): bump hosted-git-in… (compare)

  • May 07 19:58
    staltz closed #321
  • May 07 19:47

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 07 19:47
    dependabot[bot] closed #318
  • May 07 19:47
    dependabot[bot] commented #318
  • May 07 19:47
    dependabot[bot] labeled #322
  • May 07 19:47
    dependabot[bot] opened #322
  • May 07 19:47

    dependabot[bot] on npm_and_yarn

    chore(deps): bump ini from 1.3.… (compare)

  • May 07 19:47
    dependabot[bot] edited #318
  • May 07 19:46
    dependabot[bot] labeled #321
  • May 07 19:46
    dependabot[bot] opened #321
  • May 07 19:46

    dependabot[bot] on npm_and_yarn

    chore(deps): bump hosted-git-in… (compare)

  • May 07 19:46
    dependabot[bot] edited #318
  • May 07 19:45

    staltz on npm_and_yarn

    (compare)

  • May 07 19:45

    staltz on master

    chore(deps): bump handlebars fr… (compare)

  • May 07 19:45
    staltz closed #320
Ionut Achim
@monojack
thanks
Carlos Precioso
@cprecioso
Hi! I was wondering if there's a conventional way of creating an xstream from a node.js ReadableStream?
Nevermind, just found the fromEvent documentation 😅
Juan J. Jimenez-Anca
@cortopy
not sure if there are any reason/bucklescript coders in the room, but just in case https://www.npmjs.com/package/@j3a/bs-xstream
Goal is to use cycle with reasonml. I've started with the bindings for xstream
André Staltz
@staltz
Nice!
Marton Sari
@sarimarton
Hi, I've come across a problem and I'd like to get some help/advice. Currently I have a workaround, but I find it really cumbersome. I want to implement a back navigation intention stream which contains the back url and passes it to the navigation sink. This stream should be derived from a click$ (a click on a "back" button) stream, but that I have no access to the URL this way. I can combine it with a backUrl$ stream, which contains the updated url, but then the problem is that because of the history navigation, backUrl$ gets recalculated and emits its value again, which starts an infinite loop.
So far I solved the problem with a merge/fold, which contains the url, and duck type checks if the latest event on the stream is a click:
  const backNavigationHeaderClick$ =
    xs.merge(homePageClick$, backUrl$)
      .fold(
        (acc, clickOrUrl) => ({
          url: typeof clickOrUrl === 'string' ? clickOrUrl : acc.url,
          isClick: typeof clickOrUrl !== 'string'
        }),
        {}
      )
      .filter(({ isClick }) => isClick)
      .map(({ url }) => url)
But this is way too complicated, and I suppose there's a simpler solution
Géraud Henrion
@fuunnx
seungju
@seungjuchae
What`s the equivalent creation operator of fromEvent (rxjs) in xstream?
oh nevermind. found it in extra operators
Alexander Blüm
@jopek
hey, is there a way of repeating a finished stream like the RxJS's repeat operator?
André Staltz
@staltz
Not in core and probably also not on npm
But you could make use of replaceError for this purpose
Nah, I don't think we can use replaceError for that
Maybe it's worth building xstream-repeat
Sylvain Desvé
@sylvaindesve
Hi there !
I have an API with paginated resources
I get an "x-next-page" header with the next page index if there are more resources to get
I want to build a stream which emit all pages
How would you do that with xstream ?
Géraud Henrion
@fuunnx
Hi ! Recursivity is the way to go :)
Sylvain Desvé
@sylvaindesve
Thanks @fuunnx . I managed to do it using rxjs and its expand operator.