Skip to content

logicOr

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

OR conditions for values

Demo

Usage

tsx
import { 
logicOr
} from '@reause/math'
const
either
=
logicOr
(true, false) // true
// call it again after the values change
logicOr
(false, 0, '') // false

Arguments are plain read-only values (upstream takes MaybeRefOrGetter<any>[]). The result is re-evaluated on every call — there is no reactivity, so re-renders drive re-evaluation.

Type Declarations

ts
export function logicOr(...args: any[]): boolean

Source

Source · Demo · VueUse

Contributors

hairyf

Changelog

v0.1.0 on
f4c93 - fix(math): resolve logicOr audit findings (#779)
20b80 - feat(math): add logicOr (#30)

Released under the MIT License. v0.1.8