4 ms·
Excellent stuff. I find the best javascript micro libs are built with one specific purpose in mind, like at work or on a startup, then extracted out and open-so
by josscrowcroft 15y ago
Excellent stuff. I find the best javascript micro libs are built with one specific purpose in mind, like at work or on a startup, then extracted out and open-sourced :)
I'd suggest adding a config option for how to handle certain digits or multiples - personally I would prefer to have 1..20 and then 20+, 30+, etc. because they're easier to grok at a glance. I guess that could be wrapped into it pretty easily for any given use case though.
- tommoor 15y agoCheers Joss! Agreed, that would be nice.. not sure what the best way to format that config would be though.
- pavel_lishin 15y agoMaybe something like: [1,2,3,4,5,6,7,8,9,10,20,30,40,50,100] If the actual number exists in the list, show the number explicitly; otherwise, find the next lowest number and add a +.
- donohoe 15y agoI did this years ago, its not great but may help as a starting point in thinking about it: http://graphics8.nytimes.com/js/app/timeswire/app.js http://graphics8.nytimes.com/js/app/timeswire/app.js Search for this method: updatePageTimestamp It tries to find a managebale number of updates in a relevant and meaningful time frame "There have been 18 updates in the last 20 minutes" - it works on this page: http://www.nytimes.com/timeswire/ http://www.nytimes.com/timeswire/