yes.js

1.0.1 • Public • Published

yes.js NPM version

Yes.js is basically a wrapper around the setInterval and clearInterval JavaScript functions. Yes.js makes it a little easier to manage repeating interval calls.

Install

bower install yes.js or npm install yes.js

Node.js users...var Yes = require('yes.js');

API

http://bostrt.github.io/yes.js/

Examples

var myYes = new Yes();
var yesID = myYes.yes(function(str) {
    console.log(str);
}, "Oh yes!", 1000);

// ...

yes.kill(yesID);
function getUserLocation() {
...
}

var myYes = new Yes();

// Same old string
myYes.yes(function(str) {
    console.log(str);
}, "Oh Yes!", 1000);

// You can even pass functions!
myYes.yes(function(func) {
    console.log("User is at " + func());
}, getUserLocation, 5000);

// ...
// Let's kill both of our intervals.
myYes.kill();

Readme

Keywords

none

Package Sidebar

Install

npm i yes.js

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bostrt