@extra-array/max-on
@extra-array/max-on
npm i @extra-array/max-on
@extra-array/max-on

@extra-array/max-on

A collection of functions for working with Arrays.

by nodef

2.7.8 (see all)License:MITTypeScript:Not Found
npm i @extra-array/max-on
Readme

Finds largest value. 🏃‍♂️ 📦

Alternatives: compare, map.
This is part of package extra-array.

array.maxOn(x, [fn], [ths]);
// x:   an array
// fn:  map function (v, i, x)
// ths: this argument
const array = require('extra-array');

var x = [1, 2, -3, -4];
array.maxOn(x);
// 2

array.maxOn(x, v => Math.abs(v));
// -4

references

Downloads/wk

0

GitHub Stars

16

LAST COMMIT

9mos ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
2.7.8
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate