Welcome to the #resistance.

Stimulus Connect is the release tracker and news aggregator for Stimulus and its surrounding ecosystem, including StimulusReflex and CableReady.

stimulus-timeago 4.0.0

A Stimulus controller that returns the distance between the given date and now in words.

guillaumebriday guillaumebriday

Published — about 1 year ago
Updated — about 17 hours ago

distance-from-nowstimulusstimulus-controllerstimulusjstime-ago

https://github.com/stimulus-components/stimulus-timeago

https@github.com:stimulus-components/stimulus-timeago

https://github.com/stimulus-components/stimulus-timeago/issues

MIT

Controllers available: timeago

Requires Stimulus 1.1.1

 

Installation

Shell
yarn add stimulus
yarn add stimulus-timeago
index.js
import { Application } from 'stimulus'
import { definitionsFromContext } from 'stimulus/webpack-helpers'
import Timeago from 'stimulus-timeago'
const application = Application.start()
const context = require.context('controllers', true, /_controller.js$/)
application.load(definitionsFromContext(context))
application.register('timeago', Timeago)

Not using webpack? No problem.

  • date-fns

Recently Updated

New Releases

Search by Tag

Swiperactioncableajaxanimated-numberapp-bridgeasynchronously-load-HTMLaudioautocompleteautosavebehaviorbindingbootstrapbulmacablecablereadycallbackscarouselcharacter-counterchartchart.jschatchattercheck-allcheckboxcheckbox-select-allcommandscommunicationcomponentscompositioncontent-loadercontrollerdata-bindingdatatablesdevelopmentdistance-from-nowdjangodomelementseventexistenceflatpickrformgetaddress.iogridheaderhelpersherokuheyhidehotkeyshotwireimageinputiosjavascriptjerksjestkeystrokelazylightboxlightgallerymapsmodalmorphdommp3on/offoverlaypaginationparticles.jsplaceholderpopoverprefetchprogress-barrailsrails-remoterails-ujsreactivereflexremoteresource-hintsresponsiverevealrollup-pluginrollup.jsrubyscroll-progressshopifyshortcutshowsliderssoundspeedssrstickystimulusstimulus-controllerstimulus-jsstimulus-reflexstimulus-togglestimulus.jsstimulus_reflexstimulusjsstimulusreflexstripestripe.jssurplusswiperjsswitchtabletabstailwindcsstestingtextareatime-agotoggletransitionsturbolinksujsuppercaseutilitesutilityuxvalidationwebdevwebsockets