Collection of essential Vue Composition Utilities for Vue 2 and 3
Installations
npm install @vueuse/nuxt
Score
50.7
Supply Chain
50.7
Quality
89.1
Maintenance
100
Vulnerability
89.6
License
Developer
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
Yes
Node Version
22.11.0
NPM Version
10.9.0
Statistics
20,175 Stars
3,200 Commits
2,550 Forks
128 Watching
5 Branches
679 Contributors
Updated on 27 Nov 2024
Languages
TypeScript (84.69%)
Vue (14.4%)
CSS (0.59%)
JavaScript (0.29%)
HTML (0.02%)
Shell (0.01%)
Total Downloads
Cumulative downloads
Total Downloads
11,898,286
Last day
-0.1%
41,401
Compared to previous day
Last week
2.6%
215,383
Compared to previous week
Last month
8.2%
946,581
Compared to previous month
Last year
183.7%
8,392,350
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
Peer Dependencies
1
Collection of essential Vue Composition Utilities
🚀 Features
- 🎪 Interactive docs & demos
- ⚡ Fully tree shakeable: Only take what you want, bundle size
- 🦾 Type Strong: Written in TypeScript, with TS Docs
- 🔋 SSR Friendly
- 🌎 No bundler required: Usable via CDN
- 🔩 Flexible: Configurable event filters and targets
- 🔌 Optional Add-ons: Router, Firebase, RxJS, etc.
🦄 Usage
1import { useLocalStorage, useMouse, usePreferredDark } from '@vueuse/core' 2 3export default { 4 setup() { 5 // tracks mouse position 6 const { x, y } = useMouse() 7 8 // if user prefers dark theme 9 const isDark = usePreferredDark() 10 11 // persist state in localStorage 12 const store = useLocalStorage( 13 'my-storage', 14 { 15 name: 'Apple', 16 color: 'red', 17 }, 18 ) 19 20 return { x, y, isDark, store } 21 }, 22}
Refer to functions list or documentations for more details.
📦 Install
From v12.0, VueUse no longer supports Vue 2. Please use v11.x for Vue 2 support.
1npm i @vueuse/core
Demos
CDN
1<script src="https://unpkg.com/@vueuse/shared"></script> 2 3<script src="https://unpkg.com/@vueuse/core"></script>
It will be exposed to global as window.VueUse
🪴 Project Activity
🧱 Contribute
See the Contributing Guide
🌸 Thanks
This project is heavily inspired by the following awesome projects.
And thanks to all the contributors on GitHub!
👨🚀 Contributors
Financial Contributors on Open Collective
📄 License
MIT License © 2019-PRESENT Anthony Fu
No vulnerabilities found.
Reason
30 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
Found 22/30 approved changesets -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autofix.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/autofix.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autofix.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/autofix.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/ci.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/ci.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/ci.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/publish.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/publish.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/vueuse/vueuse/publish.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/autofix.yml:28
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:63
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:34
- Info: 0 out of 8 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 4 third-party GitHubAction dependencies pinned
- Info: 0 out of 3 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: topLevel 'contents' permission set to 'read': .github/workflows/autofix.yml:11
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/publish.yml:5
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 23 are checked with a SAST tool
Reason
21 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-7v5v-9h63-cj86
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-77xc-hjv8-ww97
- Warn: Project is vulnerable to: GHSA-mq8j-3h7h-p8g7
- Warn: Project is vulnerable to: GHSA-p2jh-44qj-pf2v
- Warn: Project is vulnerable to: GHSA-p7v2-p9m8-qqg7
- Warn: Project is vulnerable to: GHSA-7x97-j373-85x5
- Warn: Project is vulnerable to: GHSA-7m48-wc93-9g85
- Warn: Project is vulnerable to: GHSA-qqvq-6xgj-jw8g
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
Score
4.6
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More