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 { parseTime } from "./functions"; | |
| type IAction = { | |
| type: string; | |
| payload?: ITimerState; | |
| }; | |
| const reducer = (state: ITimerState, action: IAction): ITimerState => { | |
| switch (action.type) { | |
| case "decrement": |
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
| declare interface ITimerState { | |
| initialTime: string; | |
| time: string; | |
| status: string; | |
| ms: number; | |
| } | |
| declare interface ITimer extends ITimerState { | |
| play: () => void; | |
| pause: () => void; |
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
| const querystring = require("querystring"); | |
| const arr = [ | |
| "fl=97f301", | |
| "h=www.cloudflare.com", | |
| "ip=2804:14c:191:9689:915a:cdf3:3cfb:cd64", | |
| "ts=1601670488.57", | |
| "visit_scheme=https", | |
| "uag=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53…ML, like Gecko) Chrome/85.0.4183.83 Safari/537.36", | |
| "colo=GRU", | |
| "http=http/2", |
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
| type Acquirer = { | |
| id?: string; | |
| name: string; | |
| internalCode: string; | |
| } | |
| // QUERO DEFINIR QUE O PARAMETRO overrides É UM SUBSET DE PROPRIEDADES DO TIPO Acquirer. | |
| // NÃO QUERO DEIXAR TUDO OPCIONAL NO tipo Acquirer | |
| const insertFakeAcquirer = (overrides: Acquirer) => { | |
| const fakeAcquirer = { |
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
| { | |
| "editor.formatOnType": true, | |
| "workbench.startupEditor": "newUntitledFile", | |
| "workbench.useExperimentalGridLayout": true, | |
| "editor.formatOnSave": false, | |
| "eslint.autoFixOnSave": true, | |
| "[javascript]": { | |
| "editor.defaultFormatter": "HookyQR.beautify" | |
| }, | |
| "window.zoomLevel": 0, |
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
| const fs = require("fs"); | |
| const { | |
| cond, | |
| T, | |
| equals, | |
| always, | |
| omit, | |
| evolve, | |
| merge, | |
| compose, |
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
| const bemmer = Bemmer('gdp-notifications'); | |
| <div className={bemmer('.root')}> // gdp-notifications__root | |
| <i className={bemmer('bell-icon')} /> //gdp-notifications__root__bell-icon | |
| <span className={bemmer('some-label') /> // gdp-notifications__root__some-label | |
| <div className={bemmer('.cards')}> // gdp-notifications__root__cards | |
| <button className={bemmer(('bell-icon') />} /> //gdp-notifications__root__cards__bell-icon | |
| <span className={bemmer('time-elapsed')} /> //gdp-notifications__root__cards__time-elapsed | |
| </div> | |
| </div> |
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
| const fs = require('fs'); | |
| function fromCSVFile (path) { | |
| // helper funcs | |
| const removeEmpty = a => a.length !== 0 | |
| const removeLeading = a => a !== ''; | |
| const euQuero = str => Boolean({ | |
| 'mundo': true, | |
| 'regional': true, | |
| }[str]); |