Last active
March 10, 2019 10:05
-
-
Save jack-guy/f958b3f9c56ee42acb91d5692dbc3dd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from(iceCreamIds).pipe( | |
withLatestFrom( | |
iceCreamAuth$, | |
iceCreamPreferences$, | |
iceCreamVendors$, | |
iceCreamInventory$, | |
iceCreamTemperature$, | |
), | |
map(([ | |
iceCreamId, | |
iceCreamAuth, | |
iceCreamPreferences, | |
iceCreamVendor, | |
iceCreamInventory, | |
iceCreamTemperature | |
]) => { | |
if (!iceCreamAuth) { | |
return []; | |
} | |
return [iceCreamId, iceCreamVendor, combineInfo( | |
iceCreamPreferences, | |
iceCreamInventory, | |
iceCreamTemperature | |
)]; | |
}), | |
map(([iceCreamId, iceCreamVendor, combinedInfo]) => { | |
if (iceCreamVendor) { | |
return [iceCreamId, combinedInfo]; | |
} | |
return []; | |
}) | |
// ... | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment