Skip to content

Instance-specific settings #121

Open
@jacaetevha

Description

@jacaetevha

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()
$.timeago.settings.allowFuture = futureOrNot
$.timeago.settings.strings.suffixFromNow = suffixFromNow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions