UNPKG
@cran/gql.reflect
Version:
latest (0.1.0)
0.1.0
0.0.3
0.0.2
Cranberry Introspection Utilities for GraphQL
@cran/gql.reflect
/
mjs
/
utilities
/
HashList.js
8 lines
(7 loc)
•
215 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
export
function
createHashList
(
values
) {
const
hashlist =
new
Array
(values.
length
);
for
(
const
value
of
values) { hashlist[value.
ordinal
] = hashlist[value.
name
] = value; }
return
hashlist; }