Last active
December 2, 2019 20:01
-
-
Save bondarewicz/8041275 to your computer and use it in GitHub Desktop.
JS: estimated reading time
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
| var read_time = function(text){ | |
| var minutes = Math.floor(text.split(' ').length / 200 ) | |
| if(minutes === 0) minutes = 1 | |
| return minutes + ' min read' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment