Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/abakermi/vuejs-timeago

A simple time-ago component for vuejs
https://github.com/abakermi/vuejs-timeago

Last synced: about 1 month ago
JSON representation

A simple time-ago component for vuejs

Awesome Lists containing this project

README

        

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

A simple time-ago component for vuejs




## Installation

### Install via CDN
```html

Vue.use(VueTimeAgo.default)

```

### Install via NPM
```sh
$ npm install vuejs-timeago --save
```

#### Register as Component
```js
import Vue from 'vue'
import VueTimeAgo from 'vuejs-timeago '
export default {
name: 'App',
components: {
VueTimeAgo
}
}
```

#### Register as Plugin
```js
import Vue from 'vue'
import VueTimeAgo from 'vuejs-timeago '
Vue.use(VueTimeAgo)
```

## Usage

```js



ago

import VFeedYoutube from 'vue-feeds-youtube'
export default {
name: 'App',
components: {
VFeedYoutube
}
}

```

## Props
|Props|Description|Type|Required|
|-----|-----------|----|--------|
|date|date string to calculate time from |String|true
|format|optional date format |String|true
|iso|set format to iso |String|false

## License

vuejs-timeago is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)