UNPKG

940 BSource Map (JSON)View Raw
1{"version":3,"sources":["../../src/reducers/remaining-life-requests.js"],"names":["remainingLifeRequests","config","count","action","state","type"],"mappings":"AAIA,eAAe,SAASA,qBAAT,CAA+BC,MAA/B,EAAkF;AAC/F,SAAO,CAACC,KAAa,GAAGD,MAAM,CAACD,qBAAxB,EAA+CG,MAA/C,EAA+DC,KAA/D,KAAwF;AAC7F,YAAQD,MAAM,CAACE,IAAf;AACE,WAAK,mBAAL;AAA0B;AACxB,iBAAOH,KAAK,GAAG,CAAR,GAAYA,KAAK,GAAG,CAApB,GAAwBA,KAA/B;AACD;;AACD;AACE,eAAOA,KAAP;AALJ;AAOD,GARD;AASD","sourcesContent":["// @flow\n\nimport type {Action, Config, State} from '../types';\n\nexport default function remainingLifeRequests(config: Config): (number, Action, State) => number {\n return (count: number = config.remainingLifeRequests, action: Action, state: State): number => {\n switch (action.type) {\n case 'extraLifeAccepted': {\n return count > 0 ? count - 1 : count;\n }\n default:\n return count;\n }\n };\n}\n"],"file":"remaining-life-requests.js"}
\No newline at end of file