-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fixes and update to json-schema v1
- Loading branch information
Francesco Esposito
committed
Apr 28, 2022
1 parent
192d211
commit f39d65d
Showing
28 changed files
with
435 additions
and
420 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[user] | ||
name = Francesco Esposito | ||
email = fraesps@gmail.com |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
bower_components/ | ||
node_modules/ | ||
public/ | ||
npm-debug.log | ||
resume.html | ||
resume.pdf | ||
resume.json | ||
index.html | ||
.DS_Store | ||
bower_components/ | ||
node_modules/ | ||
public/ | ||
npm-debug.log | ||
resume.html | ||
resume.pdf | ||
resume.json | ||
index.html | ||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
node_modules/ | ||
npm-debug.log | ||
resume.html | ||
resume.pdf | ||
resume.json | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
resume.html | ||
resume.pdf | ||
resume.json | ||
.DS_Store |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
const moment = require('moment'); | ||
const { SafeString } = require('handlebars'); | ||
|
||
const birthDate = (birth) => { | ||
const out = []; | ||
if (birth && Object.keys(birth).length) { | ||
if (birth.place) { | ||
out.push(`<div> Born in ${birth.place}`); | ||
} | ||
if (birth.place && birth.state) { | ||
out.push(`, ${birth.state}`); | ||
} | ||
const year = birth.date ? moment(birth.date.toString(), ['YYYY-MM-DD']).format('YYYY') : ''; | ||
if (year && birth.place && birth.state) { | ||
out.push(` in ${year}</div>`); | ||
} else if (year && (!birth.place || birth.state)) { | ||
out.push(`<div> Born in ${year}</div>`); | ||
} | ||
} | ||
|
||
return new SafeString(out.join('')); | ||
}; | ||
|
||
module.exports = { birthDate }; | ||
const moment = require('moment'); | ||
const { SafeString } = require('handlebars'); | ||
|
||
const birthDate = (birth) => { | ||
const out = []; | ||
if (birth && Object.keys(birth).length) { | ||
if (birth.place) { | ||
out.push(`<div> Born in ${birth.place}`); | ||
} | ||
if (birth.place && birth.state) { | ||
out.push(`, ${birth.state}`); | ||
} | ||
const year = birth.date ? moment(birth.date.toString(), ['YYYY-MM-DD']).format('YYYY') : ''; | ||
if (year && birth.place && birth.state) { | ||
out.push(` in ${year}</div>`); | ||
} else if (year && (!birth.place || birth.state)) { | ||
out.push(`<div> Born in ${year}</div>`); | ||
} | ||
} | ||
|
||
return new SafeString(out.join('')); | ||
}; | ||
|
||
module.exports = { birthDate }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
const moment = require('moment'); | ||
|
||
const dateHelpers = { | ||
MY: date => moment(date.toString(), ['YYYY-MM-DD']).format('MMM YYYY'), | ||
Y: date => moment(date.toString(), ['YYYY-MM-DD']).format('YYYY'), | ||
DMY: date => moment(date.toString(), ['YYYY-MM-DD']).format('D MMM YYYY') | ||
}; | ||
|
||
module.exports = { dateHelpers }; | ||
const moment = require('moment'); | ||
|
||
const dateHelpers = { | ||
MY: date => moment(date.toString(), ['YYYY-MM-DD']).format('MMM YYYY'), | ||
Y: date => moment(date.toString(), ['YYYY-MM-DD']).format('YYYY'), | ||
DMY: date => moment(date.toString(), ['YYYY-MM-DD']).format('D MMM YYYY') | ||
}; | ||
|
||
module.exports = { dateHelpers }; |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
const { SafeString } = require('handlebars'); | ||
|
||
const paragraphSplit = (text) => { | ||
const expr = /\r\n|\r|\n/g; | ||
const lines = Array.isArray(text) ? text.join('').split(expr) : text.split(expr); | ||
const output = lines.filter(line => line).reduce((a, b) => `${a}<p>${b}</p>`, ''); | ||
return new SafeString(output); | ||
}; | ||
|
||
module.exports = { paragraphSplit }; | ||
const { SafeString } = require('handlebars'); | ||
|
||
const paragraphSplit = (text) => { | ||
const expr = /\r\n|\r|\n/g; | ||
const lines = Array.isArray(text) ? text.join('').split(expr) : text.split(expr); | ||
const output = lines.filter(line => line).reduce((a, b) => `${a}<p>${b}</p>`, ''); | ||
return new SafeString(output); | ||
}; | ||
|
||
module.exports = { paragraphSplit }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
spaceToDash: str => str.replace(/\s/g, '-').toLowerCase() | ||
}; | ||
module.exports = { | ||
spaceToDash: str => str.replace(/\s/g, '-').toLowerCase() | ||
}; |
Oops, something went wrong.