UNPKG
@extra-array/lists
Version:
latest (2.9.12)
2.9.12
2.9.11
2.9.10
2.9.9
2.9.8
2.9.7
2.9.6
2.9.5
2.9.4
2.9.3
2.9.2
2.9.1
2.9.0
2.8.76
2.8.75
2.8.74
2.8.73
2.8.72
2.8.71
2.8.70
2.8.69
2.8.67
2.8.66
2.8.65
2.8.64
2.8.63
2.8.62
Gives lists of keys, and values.
github.com/nodef/extra-array
nodef/extra-array
@extra-array/lists
/
index.ts
11 lines
(9 loc)
•
198 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
type
{
Lists
}
from
'./_types'
;
/** * Gives lists of keys, and values. *
@param
x an array */
function
lists<T>(
x
: T[]):
Lists
<T> {
return
[x.
keys
(), x.
values
()]; }
export
default
lists;