How to use steno - 10 common examples

To help you get started, we’ve selected a few steno examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 21-23 / _qd-ui / app / game / reducers / current-round.js View on Github external
function updateRoundPhase(state, phase) {
    switch (phase) {
        case RoundPhases.IDLE:
        case RoundPhases.COUNTDOWN:
            // TODO: use cleanRoundState and updateRound as handlers of roundPhase change (to RoundPhases.IDLE)
            return Object.assign({}, state, cleanRoundState(state), { phase });
        case RoundPhases.IN_PROGRESS:
        case RoundPhases.END:
            return Object.assign({}, state, { phase });
        default:
            error('Unknown round phase');
            return state;
    }
}
github natecavanaugh / github-pulls / app / app / utils / jsop.js View on Github external
var write = _.debounce(function() {
			steno.writeFile(
				filename,
				JSON.stringify(object, null, 2),
				err => {
					if (err) {
						console.error(err);
					}
				}
			);
		}, 10);
github 21-23 / _qd-ui / app / game-master / middleware / server-pipe.js View on Github external
function handleClientAction(action, phoenix, dispatch, getState) {
    switch (action.type) {
        case RoundActions.SELECTED_ROUND:
            return phoenix.send(frontService.puzzleIndexSet(action.payload));
        case RoundActions.START_ROUND:
            return phoenix.send(frontService.roundStart());
        case RoundActions.STOP_ROUND:
            return phoenix.send(frontService.roundStop());
        default:
            return log('Skip action reaction:', action.type);
    }
}
github 21-23 / _qd-ui / app / game / middleware / server-pipe.js View on Github external
function handleClientAction(action, phoenix, dispatch, getState) {
    switch (action.type) {
        case RoundActions.SOLUTION:
            return handleClientSolution(phoenix, action.payload, dispatch);
        default:
            return log('Skip action reaction:', action.type);
    }
}
github 21-23 / _qd-ui / app / game-master / middleware / server-pipe.js View on Github external
.on('disconnected', () => {
            log('server disconnected');
            dispatch(updateConnectionStatus(false));
        })
        .on('message', (incomingMessage) => {
github 21-23 / _qd-ui / app / game / middleware / server-pipe.js View on Github external
.on('message', (incomingMessage) => {
            log('server message', incomingMessage);
            const { message } = parseMessage(incomingMessage.data);

            handleServerMessage(message, dispatch);
        });
github 21-23 / _qd-ui / app / game-master / middleware / server-pipe.js View on Github external
.on('message', (incomingMessage) => {
            log('server message', incomingMessage);
            const { message } = parseMessage(incomingMessage.data);

            handleServerMessage(message, dispatch);
        });
github 21-23 / _qd-ui / app / game-master / middleware / server-pipe.js View on Github external
.on('connected', () => {
            log('server connected');
            dispatch(updateConnectionStatus(true));
        })
        .on('disconnected', () => {
github 21-23 / _qd-ui / app / game / middleware / server-pipe.js View on Github external
.on('connected', () => {
            log('server connected');
            dispatch(updateConnectionStatus(true));
        })
        .on('disconnected', () => {
github 21-23 / _qd-ui / app / game-master / reducers / current-round.js View on Github external
function updateRoundPhase(state, phase) {
    switch (phase) {
        case RoundPhases.IDLE:
        case RoundPhases.COUNTDOWN:
        case RoundPhases.IN_PROGRESS:
        case RoundPhases.END:
            return Object.assign({}, state, { phase });
        default:
            error('Unknown round phase');
            return state;
    }
}

steno

Specialized fast async file writer

MIT
Latest version published 11 months ago

Package Health Score

68 / 100
Full package analysis