vue-is-defined 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-is-defined",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Vue 3 type guard checking if ref value is not null/undefined",
5
5
  "readme": "README.md",
6
6
  "main": "dist/index.cjs",
package/README.github.md DELETED
@@ -1,39 +0,0 @@
1
- <p align="center">
2
- <img src="banner.svg" alt="vue-is-defined" width="100%" />
3
- </p>
4
-
5
- <h1 align="center">vue-is-defined</h1>
6
-
7
- <p align="center">A Vue 3 composition API type guard utility that checks if a ref's value is defined (not null or undefined), with proper TypeScript type narrowing for safe property access.</p>
8
-
9
- <p align="center">
10
- <a href="https://www.npmjs.com/package/vue-is-defined"><img src="https://img.shields.io/npm/v/vue-is-defined.svg" alt="npm version" /></a>
11
- <a href="https://www.npmjs.com/package/vue-is-defined"><img src="https://img.shields.io/npm/dm/vue-is-defined.svg" alt="npm downloads" /></a>
12
- </p>
13
-
14
- ## Installation
15
-
16
- ```bash
17
- npm install vue-is-defined
18
- ```
19
-
20
- ## Usage
21
-
22
- ```ts
23
- import { isDefined } from 'vue-is-defined'
24
- import { ref, computed } from 'vue'
25
-
26
- const value = ref<string | undefined>('hello')
27
- const defined = isDefined(value)
28
-
29
- console.log(defined.value) // true
30
-
31
- value.value = undefined
32
- console.log(defined.value) // false
33
- ```
34
-
35
- ## License
36
-
37
- MIT
38
-
39
- Extracted from [VueUse](https://vueuse.org/) for standalone use.
package/README.npm.md DELETED
@@ -1,39 +0,0 @@
1
- <p align="center">
2
- <img src="logo.svg" alt="vue-is-defined" width="180" />
3
- </p>
4
-
5
- <h1 align="center">vue-is-defined</h1>
6
-
7
- <p align="center">A Vue 3 composition API type guard utility that checks if a ref's value is defined (not null or undefined), with proper TypeScript type narrowing for safe property access.</p>
8
-
9
- <p align="center">
10
- <a href="https://www.npmjs.com/package/vue-is-defined"><img src="https://img.shields.io/npm/v/vue-is-defined.svg" alt="npm version" /></a>
11
- <a href="https://www.npmjs.com/package/vue-is-defined"><img src="https://img.shields.io/npm/dm/vue-is-defined.svg" alt="npm downloads" /></a>
12
- </p>
13
-
14
- ## Installation
15
-
16
- ```bash
17
- npm install vue-is-defined
18
- ```
19
-
20
- ## Usage
21
-
22
- ```ts
23
- import { isDefined } from 'vue-is-defined'
24
- import { ref, computed } from 'vue'
25
-
26
- const value = ref<string | undefined>('hello')
27
- const defined = isDefined(value)
28
-
29
- console.log(defined.value) // true
30
-
31
- value.value = undefined
32
- console.log(defined.value) // false
33
- ```
34
-
35
- ## License
36
-
37
- MIT
38
-
39
- Extracted from [VueUse](https://vueuse.org/) for standalone use.