What is it supposed to do
Add a utility for calculating reading times. Should also display reading times for posts on the home screen.
How can we test your branch
Have a look at the home page, add a couple of posts of different sizes and check if the time is correct. WORDS_PER_MIN is set to 265 as suggested by Medium.
1. General checklist
[x] a. Tested happy flow.
[x] b. Tested unhappy flow.
[x] c. No unexpected exceptions.
[x] d. No code with high complexity. (Big O)
[x] e. EOF newline.
[x] f. No floating comma's and spaces.
[x] g. No unexpected/unhandled errors.
[x] h. Lines no longer than 'guideline' in IDE.
[x] i. Correct indentation.
[x] j. No usage of legacy functionalities.
[x] k. (JS) Curly braces on the sameline as reserved keywords (if () { instead of { on line below)
[x] l. (JS) No double quotes.
[x] m. (JS) Single newline above unique code structures and reserved keywords.
[x] n. (JS) Variables bundled where possible.
[x] o. (JS) No semi-colons except where they have a functional necessity, such as for-loops.
[x] p. (JS) No code that is meant exclusively for development, such as console.logs for data preview.
2. If relevant, front-end checklist
[x] a. Responsive. (Desktop all the way to mobile 320px)
[x] b. Using SCSS variables where relevant.
[x] c. Relevant class names
[x] d. No modified global SCSS properties, except if necessary and fully tested the impact.
[x] e. Checked caniuse for more modern CSS properties.
[x] e. Used guards (middleware) where necessary and tested if route is guarded.
4. If relevant, test these browsers
[x] a. Chrome
[x] b. Firefox
[x] c. Opera
[x] d. Edge
[ ] e. Safari
PR Rules 1. Add relevant labels. 2. Select atleast two reviewers. 3. Assign all reviewers allowed to merge the branch, including yourself. 4. If relevant to the sprint, put related issue in 'Awaiting Approval' column on project board. 5. Add to the corresponding milestone.
Reviewer info 1. You can use aliases to refer to specific PR checklist items. For example 'Hey @JohnDoe, for this line please check 3.a and 1.d.' 2. Where possible, please use the suggestions feature in github so the author has a better idea of the solution you had in mind.
This form should be filled in by the author of this PR.
closes #277
What is it supposed to do
Add a utility for calculating reading times. Should also display reading times for posts on the home screen.
How can we test your branch
Have a look at the home page, add a couple of posts of different sizes and check if the time is correct. WORDS_PER_MIN is set to 265 as suggested by Medium.
1. General checklist
if () {
instead of{
on line below)2. If relevant, front-end checklist
3. If relevant, back-end checklist
4. If relevant, test these browsers
PR Rules
1. Add relevant labels.
2. Select atleast two reviewers.
3. Assign all reviewers allowed to merge the branch, including yourself.
4. If relevant to the sprint, put related issue in 'Awaiting Approval' column on project board.
5. Add to the corresponding milestone.
Reviewer info
1. You can use aliases to refer to specific PR checklist items. For example 'Hey @JohnDoe, for this line please check 3.a and 1.d.'
2. Where possible, please use the suggestions feature in github so the author has a better idea of the solution you had in mind.