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

count-down-ts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

count-down-ts

Countdown has timer, count, clear features. Test covered 100%.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

count-down-ts

NPM version Build Status Coverage Status code style: prettier

Countdown has timer, count, clear features. Test covered 100%.

Install

npm

npm install count-down-ts --save

yarn

yarn add count-down-ts --save

bower

bower install count-down-ts --save

Import

ES2015

import countdown from 'count-down-ts'

CommonJS

const countdown = require('count-down-ts')

script

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>DEMO</title>
  </head>
  <body>
    <script type="text/javascript" src="node_modules/count-down-ts/dist/count-down-ts.js"></script>
    <script type="text/javascript">
      var countdown = window.countdown
    </script>
  </body>
</html>

Usage

// init countdown
countdown.start(60, 0, c => console.log(c))

OR

countdown.start()

// cleat countdown setTimeout & count & timer
countdown.clear()

// countdown setTimeout return value
countdown.timer

// countdown current number
countdown.count

accept-expression

countdown.start(count, down, callback)

count: Default 60, type number. Tips: count must greater than down, or equal down.

down: Default 0, type number.

callback: Type (height: number|undefined) => void.

LICENSE

GPL v3 License

Keywords

FAQs

Package last updated on 26 May 2020

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