This file contains 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
[ | |
{ | |
"id": "01", | |
"name": "Alabama", | |
"abbr": "AL" | |
}, | |
{ | |
"id": "02", | |
"name": "Alaska", | |
"abbr": "AK" |
This file contains 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
[ | |
{ | |
"value": "AF", | |
"label": "Afghanistan" | |
}, | |
{ | |
"value": "AX", | |
"label": "Åland Islands" | |
}, |
This file contains 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
export default [ | |
{ value: "GBP", label: "🇬🇧 British Pound"}, | |
{ value: "CAD", label: "🇨🇦 Canadian Dollar"}, | |
{ value: "HKD", label: "🇭🇰 Hong Kong Dollar"}, | |
{ value: "USD", label: "🇺🇸 U.S.A Dollar"}, | |
{ value: "PHP", label: "🇵🇭 Philippine Peso"}, | |
{ value: "DKK", label: "🇩🇰 Danish Krone"}, | |
{ value: "HUF", label: "🇭🇺 Hungarian Forint"}, | |
{ value: "CZK", label: "🇨🇿 Czech Koruna"}, | |
{ value: "RON", label: "🇷🇴 Romanian Leu"}, |
This file contains 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
export default path => ({ | |
dir: path.substring(0, path.lastIndexOf('/')), | |
filename: path.substring(path.lastIndexOf('/') + 1, path.lastIndexOf('.')), | |
ext: path.substring(path.lastIndexOf('.') + 1) | |
}); |
This file contains 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
let prem = {}; | |
const tallyMatch = ({ team1, team2, score1, score2 }) => { | |
// Check to see if the `prem` object | |
// contains the team yet, and if not add it. | |
if (!prem[team1.name]) { | |
prem[team1.name] = { points: 0, name: team1.name }; | |
} | |
if (!prem[team2.name]) { | |
prem[team2.name] = { points: 0, name: team2.name }; |
This file contains 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 game = { | |
choices: ["rock", "paper", "scissors"], | |
rock: "scissors", | |
paper: "rock", | |
scissors: "paper" | |
}; | |
const play = playerChoice => { | |
if (!game.choices.includes(playerChoice)) { | |
return `Player hasn't selected valid choice`; |
This file contains 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 rockPaperScissors = usersHand => { | |
let computersHand; | |
let result; | |
// logic | |
return ` | |
You ${result}, computer picked ${computersHand} | |
`; | |
} |
This file contains 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 React from 'react'; | |
import { ThemeConsumer } from 'styled-components'; | |
import { mount } from 'enzyme'; | |
import theme from '../../app/theme'; | |
/** | |
* find is object to provide quick short end element selectors | |
*/ | |
export const find = subject => ({ | |
attr: (attr, value, el = '') => subject.find(`${el}[${attr}="${value}"]`), |
This file contains 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
{ | |
"extends": ["airbnb", "prettier", "prettier/react"], | |
"parserOptions": { | |
"sourceType": "module", | |
"allowImportExportEverywhere": true | |
}, | |
"env": { | |
"browser": true, | |
"node": true, | |
"jest": true |
This file contains 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
export default (...fns) => x => fns.reduce((v, f) => f(v), x); |
NewerOlder