0.0.0 • Published 10 years ago

bloody-streamtimer v0.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

stream-timer

browser support

install

$ npm install bloody-streamtimer

require

var timer = require("bloody-streamtimer")

api

timer(duration=0) > stream

creates a timer that emits data from 0 to 1 while running the timer.

example

timer(300)
  .pipe(stream.create(curr){
    element.style.top = String(curr * -100) + "%"
  })
  .on("end", function(){
    element.style.visibility = "hidden"
  })