count-down-ts
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,5 +0,7 @@ | ||
const countdown = { | ||
timer: null, | ||
count: null, | ||
clear: function () { | ||
class Countdown { | ||
constructor() { | ||
this.timer = null; | ||
this.count = null; | ||
} | ||
clear() { | ||
if (this.timer) { | ||
@@ -10,4 +12,4 @@ clearTimeout(this.timer); | ||
} | ||
}, | ||
start: function (c = 60, d = 0, callback) { | ||
} | ||
start(c = 60, d = 0, callback) { | ||
this.clear(); | ||
@@ -22,4 +24,5 @@ if (c >= d) { | ||
} | ||
}; | ||
} | ||
var index = new Countdown(); | ||
export { countdown }; | ||
export default index; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const countdown = { | ||
timer: null, | ||
count: null, | ||
clear: function () { | ||
class Countdown { | ||
constructor() { | ||
this.timer = null; | ||
this.count = null; | ||
} | ||
clear() { | ||
if (this.timer) { | ||
@@ -14,4 +14,4 @@ clearTimeout(this.timer); | ||
} | ||
}, | ||
start: function (c = 60, d = 0, callback) { | ||
} | ||
start(c = 60, d = 0, callback) { | ||
this.clear(); | ||
@@ -26,4 +26,5 @@ if (c >= d) { | ||
} | ||
}; | ||
} | ||
var index = new Countdown(); | ||
exports.countdown = countdown; | ||
module.exports = index; |
@@ -1,8 +0,9 @@ | ||
interface CountDownType { | ||
declare class Countdown { | ||
timer: any; | ||
count: number | null; | ||
clear: () => void; | ||
start: (c?: number, d?: number, callback?: (c: number) => void) => void; | ||
constructor(); | ||
clear(): void; | ||
start(c?: number, d?: number, callback?: (c: number) => void): void; | ||
} | ||
export declare const countdown: CountDownType; | ||
export {}; | ||
declare const _default: Countdown; | ||
export default _default; |
{ | ||
"name": "count-down-ts", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Countdown has timer, count, clear features. Test covered 100%.", | ||
@@ -5,0 +5,0 @@ "main": "dist/count-down-ts.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40270
60