UNPKG
@prelude/array
Version:
latest (3.0.0)
3.0.0
2.3.1
2.3.0
2.2.0
2.1.0
2.0.0
1.0.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
0.0.1
Array module.
@prelude/array
/
cjs
/
maybe-last.js
8 lines
•
274 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
/**
@returns
last element of an array or `undefined`. */
const
maybeLast
= (
values
) => {
return
values[values.
length
-
1
]; };
exports
.
default
= maybeLast;
//# sourceMappingURL=maybe-last.js.map