Skip to content

useMax

Category
Export Size
128 B
Package
@reause/math
Last Changed
5 days ago

Reactive Math.max

Demo

Usage

tsx
import { 
useMax
} from '@reause/math'
const
array
= [1, 2, 3, 4]
const
max
=
useMax
(
array
) // 4
tsx
import { 
useMax
} from '@reause/math'
const
max
=
useMax
(1, 3, 2) // 3

Type Declarations

ts
export function useMax(array: readonly number[]): number

export function useMax(...args: number[]): number

Source

Source · Demo · VueUse

Contributors

hairyf

Changelog

v0.1.0 on
7d755 - fix(math): resolve useAverage audit findings (#781)
d57a0 - feat(math): add useMax (#159)

Released under the MIT License. v0.1.8