GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
It would be very useful to allow for instance-specific settings. As it is, we have to override the default settings, instantiate our timeagos, and then reset the default settings.
I'd like to do:
$.timeago(allowFuture: true, strings.suffixFromNow: 'remaining')
but I'm currently doing:
futureOrNot = $.timeago.settings.allowFuture
suffixFromNow = $.timeago.settings.strings.suffixFromNow
$.timeago.settings.allowFuture = true
$.timeago.settings.strings.suffixFromNow = 'remaining'
$.timeago.settings.allowFuture = futureOrNot
$.timeago.settings.strings.suffixFromNow = suffixFromNow