This file contains hidden or 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
# https://fedoraproject.org/wiki/PackagingDrafts/Go | |
%global commit 63fe64c471e7d76be96a625350468dfc65c06c31 | |
%global shortcommit %(c=%{commit}; echo ${c:0:7}) | |
Name: example-app | |
Version: 1.0.0 | |
Release: 6%{?dist} | |
Summary: This application is an example for the golang binary RPM spec | |
License: ASL 2.0 | |
URL: http://www.example-app.io |
This file contains hidden or 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
import { eventChannel } from 'redux-saga' | |
import { call, cps, take, fork, put, cancel, select } from 'redux-saga/effects' | |
function emitterChannel(emitter, eventType) { | |
return eventChannel(emit => { | |
emitter.on(eventType, emit) | |
return () => emitter.off(eventType, emit) | |
}) | |
} |
This file contains hidden or 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
import { eventChannel } from 'redux-saga' | |
function firebaseChannel(firebase, { | |
eventType = 'value', | |
returnSnapshot = false, | |
} = {}) { | |
return eventChannel(emit => { | |
const subscription = firebase.on(eventType, snapshot => { | |
emit(returnSnapshot ? { snapshot } : { value: snapshot.val() }) | |
}) |