npm

Join us for the "JavaScript Supply Chain Security" tech talk, presented by VP of Security, Adam Baldwin. 6/20 at 10am PT.Sign up here »

bloody-every

0.0.0 • Public • Published

every

browser support

https://travis-ci.org/bloodyowl/every

install

$ npm install bloody-every

require

var every = require("bloody-every")

api

every(fn, time[, immediate])

runs fn every time milliseconds. the optional immediate boolean makes the first run as soon as possible.

fn receives a stop function as first argument, and it definitely stops the loop.

example

// starts the app and stops iterating when the DOM is ready
every(
  function(stop){
    if(/interactive|complete|loaded/.test(document.readyState)) {
      app.init()
      stop()
    }
  },
  10,
  true
)

Keywords

none

install

npm i bloody-every

Downloadsweekly downloads

1

version

0.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability