You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

animated-number-vue

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animated-number-vue - npm Package Compare versions

Comparing version

to
0.1.4

dist/AnimatedNumber.common.js

2

package.json
{
"name": "animated-number-vue",
"version": "0.1.3",
"version": "0.1.4",
"private": false,

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,8 +0,8 @@

# animated-number-vue
# animated-number-vue
![npm](https://img.shields.io/npm/dt/animated-number-vue.svg) [![Build Status](https://travis-ci.org/Leocardoso94/animated-number-vue.svg?branch=master)](https://travis-ci.org/Leocardoso94/animated-number-vue) [![](https://data.jsdelivr.com/v1/package/npm/animated-number-vue/badge)](https://www.jsdelivr.com/package/npm/animated-number-vue)
![npm](https://img.shields.io/npm/dt/animated-number-vue.svg) [![Build Status](https://travis-ci.org/Leocardoso94/animated-number-vue.svg?branch=master)](https://travis-ci.org/Leocardoso94/animated-number-vue) [![](https://data.jsdelivr.com/v1/package/npm/animated-number-vue/badge)](https://www.jsdelivr.com/package/npm/animated-number-vue)
>A simple vue animated number for Vue2, using [anime](https://github.com/juliangarnier/anime).
> A simple vue animated number for Vue2, using [anime](https://github.com/juliangarnier/anime).
>Live demo [here](https://codesandbox.io/s/v68x95mo30)
> Live demo [here](https://codesandbox.io/s/v68x95mo30)

@@ -19,9 +19,9 @@ ![](https://media.giphy.com/media/iMQAMgUSFrh7X2xBCZ/giphy.gif)

````vue
```vue
<template>
<animated-number
:value="value"
:formatValue="formatToPrice"
<animated-number
:value="value"
:formatValue="formatToPrice"
:duration="300"
/>
/>
</template>

@@ -38,3 +38,3 @@ <script>

value: 1000
}
};
},

@@ -48,20 +48,21 @@ methods: {

</script>
````
```
[View demo here](https://codesandbox.io/s/v68x95mo30)
[![Edit animated-number-vue](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/v68x95mo30)
## Props
## Props
Following `props` are used while initialization
> Note : Only `value` is a required prop. Others are optional
| Prop Name | Type | Description |
|----------|------|--------------|
| value `(required)`| [ Number, String] | number that will be animated |
| duration `(optional)`| Number | the duration of animation |
| delay `(optional)`| Number | the delay of animation |
| easing `(optional)`| String | you can found all valid values [here](https://github.com/juliangarnier/anime#easing-functions) |
| Prop Name | Type | Description |
| --------------------- | ----------------- | ---------------------------------------------------------------------------------------------- |
| value `(required)` | [ Number, String] | number that will be animated |
| duration `(optional)` | Number | the duration of animation |
| round `(optional)` | Number | remove decimals by rounding the value |
| delay `(optional)` | Number | the delay of animation |
| easing `(optional)` | String | you can found all valid values [here](https://github.com/juliangarnier/anime#easing-functions) |
#### Callbacks props

@@ -71,9 +72,9 @@

| Names | Types | Arguments | Info
| --- | --- | --- | ---
| formatValue | Function | value `Number` | A function that will manipulate the animated value |
| update | Function| animation `Object` | Called at time = 0
| run | Function| animation `Object` | Called after delay is finished
| begin | Function | animation `Object` | Called after animation delay is over
| complete | Function | animation `Object` | Called only after all the loops are completed
| Names | Types | Arguments | Info |
| ----------- | -------- | ------------------ | -------------------------------------------------- |
| formatValue | Function | value `Number` | A function that will manipulate the animated value |
| update | Function | animation `Object` | Called at time = 0 |
| run | Function | animation `Object` | Called after delay is finished |
| begin | Function | animation `Object` | Called after animation delay is over |
| complete | Function | animation `Object` | Called only after all the loops are completed |

@@ -88,3 +89,2 @@ ### Format Value

### Begin

@@ -94,7 +94,4 @@

Check if the animation has begun with `myAnimation.began`, return `true` or `false`.
### Run

@@ -104,6 +101,4 @@

### Complete
`complete()` is called once after the animation is finished.

Sorry, the diff of this file is not supported yet