vue-composition-toolset
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

vue-composition-toolset Travis (.com) Codecov

Minimalist design

Provide users with the simplest and most direct development experience

Install

Thanks for vue-demi, it works for both Vue 2 & 3.

npm i vue-composition-toolset

Usage

import { useTimerFn } from 'vue-composition-toolset'

export default {
  setup() {
    const doSomething = () => {
      /* your function */
    }
    const { trigger } = useTimerFn(doSomething, 30 * 1000) // The function will be executed every 30 seconds

    trigger.value = false // Disable the timer that executes the function
    trigger.value = true // Enable the timer that executes the function
  }
}

License

MIT License © 2021-PRESENT leafstark

/vue-composition-toolset/

    Package Sidebar

    Install

    npm i vue-composition-toolset

    Weekly Downloads

    6

    Version

    0.1.6

    License

    MIT

    Unpacked Size

    11.7 kB

    Total Files

    24

    Last publish

    Collaborators

    • leafstark