Skip to content

Instantly share code, notes, and snippets.

@bondarewicz
Last active December 2, 2019 20:01
Show Gist options
  • Select an option

  • Save bondarewicz/8041275 to your computer and use it in GitHub Desktop.

Select an option

Save bondarewicz/8041275 to your computer and use it in GitHub Desktop.
JS: estimated reading time
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