Callbag source for connected gamepad inputs
yarn add callbag-gamepads
const pipe = require("callbag-pipe");
const forEach = require("callbag-for-each");
const gamepads = require("callbag-gamepads");
pipe(
gamepads,
forEach(gamepads => {
// have fun
})
);
If you’re blessed with the pipeline operator:
gamepads
|> forEach(gamepads => {
// have fun
});