# vcount

> vue-count

Latest version **2.0.5** (published 2017-10-05) · 0 weekly downloads

## Install

```sh
npm install vcount
pnpm add vcount
yarn add vcount
bun add vcount
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2017-10-05 |
| First published | 2017-10-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | reckful |
| Maintainers | reckful |

## Links

- npm: https://www.npmjs.com/package/vcount
- npm.io page: https://npm.io/package/vcount

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.3.3

## Recent versions

- 2.0.5 (latest) — 2017-10-05
- 2.0.4 — 2017-10-05
- 2.0.3 — 2017-10-05
- 2.0.2 — 2017-10-05
- 2.0.1 — 2017-10-05
- 2.0.0 — 2017-10-05

## README

# Vcount

## Install
``` bash
npm install vcount
```

## Example
``` vue
<template>
  <vcount :start='startValue' :end='endValue' :duration='duration'></vcount>
</template>

<script>
import vcount from 'vcount'
export default {
    components: { vcount },
    data () {
        return {
            startValue: 0,
            endValue: 2000,
            duration:4000
        }
    }
}
</script>
```

## Usage
#### Props:
- `start`: Number</br>
the value you want to begin at
- `end`: Number</br>
the value you want to arrive at
- `duration`: Number</br>
duration in milliseconds
- `decimal`: String</br>
split decimal
- `decimals`: Number</br>
number of decimal places in number
- `separator`: String</br>
character to use as a separator
- `prefix`: String</br>
optional text before the result
- `suffix`: String</br>
optional text after the result
- `useEasing`: Boolean</br>
easing function
- `watchValue`: Boolean</br>
watch startValue and endValue

#### Default Options:

```vue
<template>
    <vcount :start='start' :end='end' :duration='duration' :decimal='decimal' :decimals='decimals' :separator='separator' :prefix='prefix' :suffix='suffix' :useEasing='useEasing' :watchValue='watchValue'></vcount>
</template>
<script>
export default {
  data(){
    return {
      start:0,
      end:2000,
      duration:4000,
      decimal:'.',  
      decimals:'0',
      separator:',',
      prefix:'',
      suffix:'',
      useEasing:true,
      watchValue:true
    }
  }
}
</script>
```

#### Methods:

```vue
<template>
    <vcount ref='child'></vcount>
    <span @click='toCallOnComplete'></span>
</template>
<script>
export default {
  methods:{
    toCallOnComplete(){
        this.$refs.child.play(function(){
            alert('completed')
        })
        // or
        // this.$refs.child.play(this.completed)
    },
    completed(){
        alert('completed')
    }
  }
}
</script>
```

Other Methods:

```js
// Toggle pause/resume
this.$refs.child.pauseResume()

// Reset
this.$refs.child.reset()
```

## License
[MIT](https://github.com/Reckfu1/vcount/blob/master/LICENSE)

---
_Source: https://npm.io/package/vcount · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
