Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v-simple-timeago

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-simple-timeago

A simple no-dependencies Time Ago component to convert complex dates into human readable date strings.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

v-simple-timeago

A simple no-dependencies Time Ago component to convert complex dates into human readable date strings.

Setup

Add the component to your node-modules or libraries folder (soon)

npm i v-simple-timeago

Import the component into your .vue files and add it to the components section

import VSimpleTimeago from "v-simple-timeago"

export default {
    components: {
        VSimpleTimeago
    },
    data() {
        return {
            now: Date.now(),
            yesterday: 1628646076306
        }
    }
}

Use it in your template.

<VSimpleTimeago :date="now"></VSimpleTimeago>

<VSimpleTimeago :date="yesterday"></VSimpleTimeago>

##Props

PropDefaultDefinition
dateDate.now()Required to display a correct date formatted
initialUppertrueSets the initial letter to upper case

Development

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

FAQs

Package last updated on 17 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc