Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

timers-obj

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timers-obj

Timers as objects

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-86.07%
Maintainers
1
Weekly downloads
 
Created
Source

timers-obj

Build Status Coverage Status npm

This module provides the wrappers for standard timers module so all timers (immediate, interval and timeout) can be used as objects.

For constructors, callback argument is after delay argument so it provides more convenient syntax for CoffeeScript and LiveScript, ie.:

timer = timers.interval 1000, ->
  console.log 'Time is ticking'

Installation

npm install timers-obj

Usage

Require in your script

const timers = require('timers-obj')
immediate

Create timer

const timer = timers.immediate(cb, [...args])

Remove timer

timer.remove()
interval

Create timer

const timer = timers.interval(delay, cb, [...args])

Remove timer

timer.remove()
timeout

Create timer

const timer = timers.timeout(delay, cb, [...args])

Remove timer

timer.remove()

License

Copyright (c) 2016 Piotr Roszatycki piotr.roszatycki@gmail.com

Artistic License 2.0

Keywords

FAQs

Package last updated on 31 Jul 2016

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