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 - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

8

dist/count-down-ts.esm.js

@@ -14,2 +14,8 @@ class Countdown {

start(c = 60, d = 0, callback) {
if (c < d) {
throw 'count-down-ts start(c, d, callback?) function c must be greater than d.';
}
this.carry(c, d, callback);
}
carry(c, d, callback) {
this.clear();

@@ -20,3 +26,3 @@ if (c >= d) {

this.timer = setTimeout(() => {
this.start(c - 1, d, callback);
this.carry(c - 1, d, callback);
}, 1000);

@@ -23,0 +29,0 @@ }

@@ -16,2 +16,8 @@ 'use strict';

start(c = 60, d = 0, callback) {
if (c < d) {
throw 'count-down-ts start(c, d, callback?) function c must be greater than d.';
}
this.carry(c, d, callback);
}
carry(c, d, callback) {
this.clear();

@@ -22,3 +28,3 @@ if (c >= d) {

this.timer = setTimeout(() => {
this.start(c - 1, d, callback);
this.carry(c - 1, d, callback);
}, 1000);

@@ -25,0 +31,0 @@ }

@@ -7,4 +7,5 @@ declare class Countdown {

start(c?: number, d?: number, callback?: (c: number) => void): void;
carry(c: number, d: number, callback?: (c: number) => void): void;
}
declare const _default: Countdown;
export default _default;

2

package.json
{
"name": "count-down-ts",
"version": "1.0.1",
"version": "1.0.2",
"description": "Countdown has timer, count, clear features. Test covered 100%.",

@@ -5,0 +5,0 @@ "main": "dist/count-down-ts.js",

@@ -39,3 +39,3 @@ # count-down-ts

```typescript
import { countdown } from 'count-down-ts'
import countdown from 'count-down-ts'
```

@@ -46,3 +46,3 @@

```javascript
const { countdown } = require('count-down-ts')
const countdown = require('count-down-ts')
```

@@ -92,5 +92,5 @@

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

@@ -97,0 +97,0 @@ `callback`: Type (height: number|undefined) => void.

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