11 lines
275 B
JavaScript
11 lines
275 B
JavaScript
|
module.exports = {
|
||
|
getNextHeadingLevel(currentLevel) {
|
||
|
return parseInt(currentLevel, 10) + 1;
|
||
|
},
|
||
|
getReadingTime(text) {
|
||
|
const wordsPerMinute = 200;
|
||
|
const numberOfWords = text.split(/\s/g).length;
|
||
|
return Math.ceil(numberOfWords / wordsPerMinute);
|
||
|
}
|
||
|
};
|