UNPKG
cli-legend
Version:
latest (1.0.0)
1.0.0
"A fun command-line rogurelike dungeon game"
github.com/SamparkBhol/roguemaze
SamparkBhol/roguemaze
cli-legend
/
RogueMaze
/
node_modules
/
rxjs
/
dist
/
esm
/
internal
/
operators
/
max.js
6 lines
•
264 B
JavaScript
View Raw
1
2
3
4
5
6
import
{ reduce }
from
'./reduce'
;
import
{ isFunction }
from
'../util/isFunction'
;
export
function
max
(
comparer
) {
return
reduce
(
isFunction
(comparer) ?
(
x, y
) =>
(
comparer
(x, y) >
0
? x : y) :
(
x, y
) =>
(x > y ? x : y)); }
//# sourceMappingURL=max.js.map