New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

js-stopwatch-timer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-stopwatch-timer

A simple stopwatch/timer module created with pure vanilla JavaScript without any external dependencies.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

js-stopwatch-timer

A simple stopwatch/timer module created with pure vanilla JavaScript without any external dependencies.

Usage

How to install and use in a project

  • Download the repo
  • Copy file src/timer.js in to your project directory
  • Import the module and create an instance of Timer
import Timer from 'timer.js'
const timer = new Timer()

timer.start()

Methods

timer.start()

Starts counting upwards from 0.

timer.stop()

Stops the timer.

timer.reset()

Stops the timer and resets the time.

timer.countdown(seconds)

Starts a countdown of seconds depending on user input.

timer.lap()

Returns the time that has passed in an object.

timer.log()

Logs current time.

Versions

1.0.0

  • 1.0.0 was released 2022-09-26

FAQs

Package last updated on 28 Sep 2022

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