Socket
Socket
Sign inDemoInstall

set-harmonic-interval

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    set-harmonic-interval

Works similar to `setInterval`, but calls all callbacks scheduled using `setHarmonicInterval` all at once, which have same delay in milliseconds.


Version published
Weekly downloads
1.5M
increased by6.42%
Maintainers
1
Install size
10.4 kB
Created
Weekly downloads
 

Changelog

Source

1.0.1 (2019-10-23)

Bug Fixes

  • husky hooks now should be defined in separate package.json field; (6a444f7)
  • prettier expects doubleqotes on file template (d449a86)

Features

  • 🎸 implement setHarmonicInterval and clearHarmonicInterval (2cb24b4)

Readme

Source

set-harmonic-interval

Works similar to setInterval, but calls all callbacks scheduled using setHarmonicInterval all at once, which have same delay in milliseconds.

Install

npm install set-harmonic-interval

Usage

In below example 1 and 2 will always be printed together every second.

const { setHarmonicInterval, clearHarmonicInterval } = require('set-harmonic-interval');

setHarmonicInterval(() => console.log(1), 1000);
setTimeout(() => {
  setHarmonicInterval(() => console.log(2), 1000);
}, 500);

License

Unlicense — public domain.

FAQs

Last updated on 23 Oct 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc