UNPKG
command-line-pong
Version:
latest (1.4.1)
1.4.1
1.4.0
1.3.1
1.3.0
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.0
This is pong in the command line
github.com/liambloom/node-pong
liambloom/node-pong
command-line-pong
/
lib
/
animation.js
10 lines
(9 loc)
•
277 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
const
{ performance } =
require
(
"perf_hooks"
);
if
(!
global
.
requestAnimationFrame
) {
global
.
requestAnimationFrame
=
callback
=>
{
return
setImmediate
(
() =>
{
callback
(performance.
now
()); }); };
global
.
cancelAnimationFrame
=
global
.
clearImmediate
; }