0.1.0 • Published 5 years ago

timeline-control v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

timeline-control

NPM JavaScript Style Guide

What is this

A tool for controlling whatever you want to do on anywhere on time line.

Install

npm i timeline-control

Usage

import runTimeline from 'timeline-control'

let count = 0
const t = [
  {
    timeInterval: 1000,
    repeat: 10,
    action: () => {
      count++
      console.log(count)
    },
  },
  { timeInterval: 1000, action: () => console.log('end') },
]

setTimeline(t)

Properties

propertytypedefaultdescription
timeIntervalnumber0The time interval between the last action or start
repeatnumber1Times to repeat this function
actionfunction() => {}Action to do on the moment

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT © ronny1020

0.1.0

5 years ago