Socket
Socket
Sign inDemoInstall

vuejs-timeago

Package Overview
Dependencies
12
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vuejs-timeago

A simple time-ago component for vuejs


Version published
Maintainers
1
Install size
21.5 MB
Created

Readme

Source

vuejs-timeago

![Build Status](https://travis-ci.com/abakermi/vuejs-timeago .svg?branch=master) ![npm version](https://badge.fury.io/js/vuejs-timeago .svg)

A simple time-ago component for vuejs


## Installation

Install via CDN

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vuejs-timeago @0.0.1"></script>

<script>
  Vue.use(VueTimeAgo.default)
</script>

Install via NPM

$ npm install vuejs-timeago  --save
Register as Component
import Vue from 'vue'
import VueTimeAgo from 'vuejs-timeago '
export default {
  name: 'App',
  components: {
    VueTimeAgo
  }
}
Register as Plugin
import Vue from 'vue'
import VueTimeAgo from 'vuejs-timeago '
Vue.use(VueTimeAgo)

Usage

<template>
 <vuejs-timeago  date="2020-08-07T11:32:01.592Z" format="DD-MM-YYYY" iso="true" > 
   <slot >
     ago
     </slot>
 </vuejs-timeago >
</template>
<script>
import VFeedYoutube from 'vue-feeds-youtube'
export default {
  name: 'App',
  components: {
    VFeedYoutube
  }
}
</script>

Props

PropsDescriptionTypeRequired
datedate string to calculate time fromStringtrue
formatoptional date formatStringtrue
isoset format to isoStringfalse

License

vuejs-timeago is open-sourced software licensed under the MIT license

Keywords

FAQs

Last updated on 07 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc