UNPKG
@nepwork/dashboards
Version:
latest (0.0.2)
0.0.2
Dashboards for emergencies and monitoring
github.com/nepwork/admin-ui
nepwork/admin-ui
@nepwork/dashboards
/
hgraph
/
node_modules
/
d3-array
/
src
/
pairs.js
11 lines
(9 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
default
function
(
array
, f
)
{
if
(f ==
null
) f = pair;
var
i =
0
, n =
array
.length -
1
, p =
array
[
0
], pairs =
new
Array
(n <
0
?
0
: n);
while
(i < n) pairs[i] =
f
(p, p =
array
[++i]);
return
pairs; } export
function
pair
(
a, b
)
{
return
[a, b]; }