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
"scripts": { | |
"start": "react-app-rewired start", | |
"build": "react-app-rewired build", | |
"test": "react-app-rewired test --env=jsdom", | |
"eject": "react-scripts eject" | |
} |
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
Show hidden characters
{ | |
"plugins":[] | |
} |
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
module.exports = { | |
extends: [ | |
'react-app', // for editor | |
'eslint:recommended', | |
'plugin:prettier/recommended', | |
'prettier/react', | |
], | |
parser: 'babel-eslint', | |
plugins: ['babel'], | |
rules: { |
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
{ | |
"plugins":[ | |
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal"}], | |
] | |
} |
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
function doubleSay (str) { | |
return str + ", " + str; | |
} | |
function capitalize (str) { | |
return str[0].toUpperCase() + str.substring(1); | |
} | |
function exclaim (str) { | |
return str + '!'; | |
} |
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
let result = exclaim(capitalize(doubleSay("hello"))); | |
result //=> "Hello, hello!" |
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
let result = "hello" | |
|> doubleSay | |
|> capitalize | |
|> exclaim; | |
result //=> "Hello, hello!" |
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
function double (x) { return x + x; } | |
function add (x, y) { return x + y; } | |
function boundScore (min, max, score) { | |
return Math.max(min, Math.min(max, score)); | |
} |
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
let person = { score: 25 }; | |
let newScore = person.score | |
|> double | |
|> (_ => add(7, _)) | |
|> (_ => boundScore(0, 100, _)); | |
newScore //=> 57 |
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
let person = { score: 25 }; | |
let newScore = person.score | |
|> double | |
|> (num => add(7, num)) | |
|> (num => boundScore(0, 100, num)); | |
newScore //=> 57 |