Skip to content

Commit 1b88a30

Browse files
Keegan CampbellKeegan Campbell
Keegan Campbell
authored and
Keegan Campbell
committed
Initial commit.
0 parents  commit 1b88a30

14 files changed

+14373
-0
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["env"]
3+
}

.eslintignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
build/
2+
.gitignore
3+
.prettierrc
4+
package-lock.json
5+
package.json
6+
webpack.config.js
7+
yarn.lock

.eslintrc.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"parser": "babel-eslint",
3+
"parserOptions": {
4+
"ecmaVersion": 6
5+
},
6+
"env": {
7+
"node": true
8+
},
9+
"extends": ["airbnb-base", "prettier"],
10+
"globals": {
11+
"action": true,
12+
"afterEach": true,
13+
"beforeEach": true,
14+
"describe": true,
15+
"document": true,
16+
"expect": true,
17+
"fetch": true,
18+
"FormData": true,
19+
"it": true,
20+
"jest": true,
21+
"location": true,
22+
"URLSearchParams": true,
23+
"window": true,
24+
"Headers": true
25+
},
26+
"plugins": [],
27+
"rules": {
28+
"no-console": "off",
29+
"react/forbid-prop-types": "off",
30+
"no-underscore-dangle": "off",
31+
"comma-dangle": [
32+
"error",
33+
{
34+
"functions": "never"
35+
}
36+
]
37+
}
38+
}

.gitignore

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
Archive.zip
2+
build/
3+
4+
# Created by https://www.gitignore.io/api/node,visualstudiocode
5+
6+
### macOS ###
7+
*.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
11+
# Icon must end with two \r
12+
Icon
13+
14+
# Thumbnails
15+
._*
16+
17+
# Files that might appear in the root of a volume
18+
.DocumentRevisions-V100
19+
.fseventsd
20+
.Spotlight-V100
21+
.TemporaryItems
22+
.Trashes
23+
.VolumeIcon.icns
24+
.com.apple.timemachine.donotpresent
25+
26+
# Directories potentially created on remote AFP share
27+
.AppleDB
28+
.AppleDesktop
29+
Network Trash Folder
30+
Temporary Items
31+
.apdisk
32+
33+
### Node ###
34+
# Logs
35+
logs
36+
*.log
37+
npm-debug.log*
38+
yarn-debug.log*
39+
yarn-error.log*
40+
41+
# Runtime data
42+
pids
43+
*.pid
44+
*.seed
45+
*.pid.lock
46+
47+
# Directory for instrumented libs generated by jscoverage/JSCover
48+
lib-cov
49+
50+
# Coverage directory used by tools like istanbul
51+
coverage
52+
53+
# nyc test coverage
54+
.nyc_output
55+
56+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
57+
.grunt
58+
59+
# Bower dependency directory (https://bower.io/)
60+
bower_components
61+
62+
# node-waf configuration
63+
.lock-wscript
64+
65+
# Compiled binary addons (http://nodejs.org/api/addons.html)
66+
build/Release
67+
68+
# Dependency directories
69+
node_modules/
70+
jspm_packages/
71+
72+
# Typescript v1 declaration files
73+
typings/
74+
75+
# Optional npm cache directory
76+
.npm
77+
78+
# Optional eslint cache
79+
.eslintcache
80+
81+
# Optional REPL history
82+
.node_repl_history
83+
84+
# Output of 'npm pack'
85+
*.tgz
86+
87+
# Yarn Integrity file
88+
.yarn-integrity
89+
90+
# dotenv environment variables file
91+
.env
92+
93+
94+
### VisualStudioCode ###
95+
.vscode/*
96+
!.vscode/settings.json
97+
!.vscode/tasks.json
98+
!.vscode/launch.json
99+
!.vscode/extensions.json
100+
.history
101+
102+
103+
# End of https://www.gitignore.io/api/node,visualstudiocode

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const getNextArrivalTimes = (arrivalsByStop) => {
2+
console.log('arrivals by stop', arrivalsByStop);
3+
let differences = '';
4+
arrivalsByStop.forEach((arrival, index) => {
5+
differences += (`train ${index}: ${new Date(parseInt(arrivalsByStop[0].predictedArrivalTime))}.`);
6+
});
7+
return differences;
8+
}
9+
10+
module.exports = { getNextArrivalTimes };

0 commit comments

Comments
 (0)