Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
teddi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
teddi
Commits
8d7d9629
Commit
8d7d9629
authored
Nov 13, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b96bf7cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
18 deletions
+22
-18
Countdown.js
dist/time/Countdown.js
+3
-3
index.d.ts
dist/time/index.d.ts
+3
-4
index.js
dist/time/index.js
+13
-7
index.ts
src/time/index.ts
+3
-4
No files found.
dist/time/Countdown.js
View file @
8d7d9629
...
...
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
Countdown
=
void
0
;
var
event_1
=
require
(
"../event"
);
function
getNum
(
n
)
{
function
get
Time
Num
(
n
)
{
return
n
>=
10
?
""
+
n
:
"0"
+
n
;
}
var
Countdown
=
/** @class */
(
function
(
_super
)
{
...
...
@@ -41,13 +41,13 @@ var Countdown = /** @class */ (function (_super) {
var
hours
=
Math
.
floor
(
left
/
3600
);
var
minutes
=
Math
.
floor
((
left
%
3600
)
/
60
);
var
seconds
=
left
-
hours
*
3600
-
minutes
*
60
;
return
get
Num
(
hours
)
+
":"
+
getNum
(
minutes
)
+
":"
+
get
Num
(
seconds
);
return
get
TimeNum
(
hours
)
+
":"
+
getTimeNum
(
minutes
)
+
":"
+
getTime
Num
(
seconds
);
};
Countdown
.
prototype
.
getMMSS
=
function
()
{
var
left
=
this
.
_seconds
-
this
.
_counter
;
var
minutes
=
Math
.
floor
(
left
/
60
);
var
seconds
=
left
%
60
;
return
get
Num
(
minutes
)
+
":"
+
get
Num
(
seconds
);
return
get
TimeNum
(
minutes
)
+
":"
+
getTime
Num
(
seconds
);
};
Countdown
.
prototype
.
getText
=
function
()
{
return
this
.
_text
.
replace
(
"{0}"
,
this
.
getCountdown
());
...
...
dist/time/index.d.ts
View file @
8d7d9629
import
{
Countdown
}
from
"./Countdown"
;
import
{
Timer
}
from
"./Timer"
;
import
{
getDateTimer
}
from
"./tools"
;
export
{
Timer
,
getDateTimer
,
Countdown
};
export
*
from
"./Countdown"
;
export
*
from
"./Timer"
;
export
*
from
"./tools"
;
dist/time/index.js
View file @
8d7d9629
"use strict"
;
var
__createBinding
=
(
this
&&
this
.
__createBinding
)
||
(
Object
.
create
?
(
function
(
o
,
m
,
k
,
k2
)
{
if
(
k2
===
undefined
)
k2
=
k
;
Object
.
defineProperty
(
o
,
k2
,
{
enumerable
:
true
,
get
:
function
()
{
return
m
[
k
];
}
});
})
:
(
function
(
o
,
m
,
k
,
k2
)
{
if
(
k2
===
undefined
)
k2
=
k
;
o
[
k2
]
=
m
[
k
];
}));
var
__exportStar
=
(
this
&&
this
.
__exportStar
)
||
function
(
m
,
exports
)
{
for
(
var
p
in
m
)
if
(
p
!==
"default"
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
exports
,
p
))
__createBinding
(
exports
,
m
,
p
);
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
Countdown
=
exports
.
getDateTimer
=
exports
.
Timer
=
void
0
;
var
Countdown_1
=
require
(
"./Countdown"
);
Object
.
defineProperty
(
exports
,
"Countdown"
,
{
enumerable
:
true
,
get
:
function
()
{
return
Countdown_1
.
Countdown
;
}
});
var
Timer_1
=
require
(
"./Timer"
);
Object
.
defineProperty
(
exports
,
"Timer"
,
{
enumerable
:
true
,
get
:
function
()
{
return
Timer_1
.
Timer
;
}
});
var
tools_1
=
require
(
"./tools"
);
Object
.
defineProperty
(
exports
,
"getDateTimer"
,
{
enumerable
:
true
,
get
:
function
()
{
return
tools_1
.
getDateTimer
;
}
});
__exportStar
(
require
(
"./Countdown"
),
exports
);
__exportStar
(
require
(
"./Timer"
),
exports
);
__exportStar
(
require
(
"./tools"
),
exports
);
src/time/index.ts
View file @
8d7d9629
import
{
Countdown
}
from
"./Countdown"
;
import
{
Timer
}
from
"./Timer"
;
import
{
getDateTimer
}
from
"./tools"
;
export
{
Timer
,
getDateTimer
,
Countdown
};
export
*
from
"./Countdown"
;
export
*
from
"./Timer"
;
export
*
from
"./tools"
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment