• Robert Knight's avatar
    Remove Moment.js · a07d0f77
    Robert Knight authored
    Moment.js is only used in a single place, for converting ISO8601 date-time strings
    from the annotation's 'updated' field to user-friendly
    date strings (eg. 'Wednesday 17 Dec, 18:59') for the tooltips
    for the last-updated link in the annotation card.
    
    Replacing this with functions from the built-in Date object saves
    167KB from the generated bundle size (see
    moment/min/moment-with-locales.min.js) and also speeds up the digest
    cycle. For 20 annotation cards in the /stream view, generating the
    date string used to take 6-7ms with Moment. It takes <2ms with
    the built in functions in a current build of Chrome.
    
    This still shows up as the most expensive watch expression, so
    we might want to add caching as well.
    a07d0f77
Name
Last commit
Last update
..
test Loading commit data...
converter.js Loading commit data...
document-domain.js Loading commit data...
document-title.js Loading commit data...
persona.js Loading commit data...
urlencode.js Loading commit data...