UNPKG
animate-value
Version:
latest (1.1.0)
1.1.0
1.0.1
1.0.0
🏃 animates a numeric value
github.com/duivvv/animate-value
duivvv/animate-value
animate-value
/
src
/
lib
/
calc
/
calcStartEnd.js
18 lines
(11 loc)
•
259 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// @flow
import
now
from
'../time/now'
;
type
data = {
start
:
number
,
end
:
number
};
export
default
(
delay
:
number
,
duration
:
number
):
data
=>
{
const
start
:
number
= delay +
now
();
const
end
:
number
= start + duration;
return
{start, end}; };