fn
logicNot
v0.0.15testeddemoReactive 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 === falsets
const isLoading = ref(false);
const isReady = logicNot(isLoading);
// isReady.value === trueDemo
Loading demo…
Signature
ts
export function logicNot(v: MaybeRefOrGetter<unknown>): LogicNotReturn{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
v | unknown | The boolean ref or getter to negate |
Returns
LogicNotReturnA readonly computed that is `true` only when the input is falsy