Socket
Socket
Sign inDemoInstall

timers.js

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    timers.js

Pure JavaScript timer plugin


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Timers.js

Pure JavaScript timer plugin

Installation

NPM

npm install timers.js --save

In Node.js

require('pre.js')

Direct download from latest releases

Usage

Include

<script src="dist/js/timers.js"></script>

Initialize

new Timer();

Configuration

new Timer({
    // Options here
    property: value,
    ...
});

Options

PropertyDescriptionAvailable valuesDefault value
elTimer.js elementElement selector (string)'.timer'
time.secondSet initial secondinteger0
time.minuteSet initial minuteinteger0
time.hourSet initial hourinteger0
isStopedSet timer statusbooleanfalse

Methods

MethodDescription
.get('second|minute|hour')Get the current time
.set('second|minute|hour', value)Set time
.pause()Pause the timer
.stop()Stop the timer
.resume()Resume the timer

FAQs

Last updated on 20 Nov 2017

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