vue-is-defined
v1.0.10
Published
Vue 3 type guard checking if ref value is not null/undefined
Maintainers
Readme
Installation
npm install vue-is-definedUsage
import { isDefined } from 'vue-is-defined'
import { ref, computed } from 'vue'
const value = ref<string | undefined>('hello')
const defined = isDefined(value)
console.log(defined.value) // true
value.value = undefined
console.log(defined.value) // falseLicense
MIT
Extracted from VueUse for standalone use.
