fn

logicNot

v0.0.14testeddemo

Reactive logical NOT of a boolean ref or getter. The result is true whenever the input resolves to a falsy value.

Examples

ts
const a = ref(true);
const notA = logicNot(a);
// notA.value === false
ts
const isLoading = ref(false);
const isReady = logicNot(isLoading);
// isReady.value === true

Demo

Loading demo…

Signature

ts
export function logicNot(v: MaybeRefOrGetter<unknown>): LogicNotReturn{ ... }

Parameters

ParameterTypeDescription
vMaybeRefOrGetter<unknown>The boolean ref or getter to negate

Returns

LogicNotReturnA readonly computed that is true only when the input is falsy