New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

inbetween-time

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inbetween-time

Iteration tool Similar to Unity coruotine

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Inbetween-time.js

Iteration tool Similar to Unity coruotine

Coming

  • await/waitforSeconds/pause -- pause iterations for a certain amount of time

Usage

https://cdn.rawgit.com/gilbertfrausto/inbetween-time/6b439ace/inbetween-time.js

Fiddle

https://jsfiddle.net/e95jh54t/

Repo

https://github.com/gilbertfrausto/inbetween-time

Examples

Inbetween time constructor and instance

constructor t_t({}) takes and Object with these options
OptionDescription
timertimer Time in ms between each Iteration.
countMax number of iterations.
methodMethod to be called during each iteration
Inbetween time Instance
MethodsDescription
iteratorwill call the method property passed into the constructor @return {void}.
waittake one argument and this is the amount of time the iterator will be stopped in milliseconds @return {void}
getCountget the count of iteration set to happen @return {number}
setCountchange the amount of iterations set to happen @return {void}
getInterationsgetInterations get the iterations number @return {number}

let myInstance = t_t({
    timer: 1000,
    count: 5,
    method: () => {
        console.log(`
            Will fire ${myInstance.getCount()} times!,
            Iteration count ${myInstance.getInterations() + 1}
        `);
    }
});

myInstance.iterator(); // Start iterator
myInstance.wait(2000);// Pause Iteration

Keywords

FAQs

Package last updated on 02 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc