Gathering detailed insights and metrics for @aspida/swrv
Gathering detailed insights and metrics for @aspida/swrv
Gathering detailed insights and metrics for @aspida/swrv
Gathering detailed insights and metrics for @aspida/swrv
TypeScript friendly HTTP client wrapper for the browser and node.js.
npm install @aspida/swrv
Typescript
Module System
Node Version
NPM Version
49.8
Supply Chain
98.2
Quality
77.4
Maintenance
100
Vulnerability
100
License
TypeScript (99.68%)
JavaScript (0.32%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1,071 Stars
1,706 Commits
36 Forks
5 Watchers
9 Branches
11 Contributors
Updated on May 04, 2025
Latest Version
1.14.0
Package Id
@aspida/swrv@1.14.0
Unpacked Size
21.60 kB
Size
4.27 kB
File Count
11
NPM Version
9.6.7
Node Version
18.17.0
Published on
Aug 15, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Using npm:
1$ npm install aspida @aspida/swrv @aspida/axios swrv axios 2# $ npm install aspida @aspida/swrv @aspida/fetch swrv 3# $ npm install aspida @aspida/swrv @aspida/node-fetch swrv node-fetch
Using Yarn:
1$ yarn add aspida @aspida/swrv @aspida/axios swrv axios
2# $ yarn add aspida @aspida/swrv @aspida/fetch swrv
3# $ yarn add aspida @aspida/swrv @aspida/node-fetch swrv node-fetch
src/index.vue
1<template> 2 <div> 3 <div v-if="error">failed to load</div> 4 <div v-if="!data">loading...</div> 5 <div v-else>hello {{ data.name }}</div> 6 </div> 7</template> 8 9<script lang="ts"> 10import { defineComponent } from "@vue/composition-api"; 11import useAspidaSWRV from "@aspida/swrv"; 12import aspida from "@aspida/axios"; // "@aspida/fetch", "@aspida/node-fetch" 13import api from "../api/$api"; 14 15const client = api(aspida()); 16 17export default defineComponent({ 18 name: "Profile", 19 20 setup() { 21 const { data, error } = useAspidaSWRV(client.user._userId(123), { query: { name: "mario" } }); 22 23 return { data, error }; 24 }, 25}); 26</script>
src/index.vue
1<template> 2 <div> 3 <div v-if="error">failed to load</div> 4 <div v-if="!data">loading...</div> 5 <template v-else> 6 <div>Status: {{ data.status }}</div> 7 <div>Headers: {{ JSON.stringify(data.headers) }}</div> 8 <div>Name: {{ data.body.name }}</div> 9 </template> 10 </div> 11</template> 12 13<script lang="ts"> 14import { defineComponent } from "@vue/composition-api"; 15import useAspidaSWRV from "@aspida/swrv"; 16import aspida from "@aspida/axios"; // "@aspida/fetch", "@aspida/node-fetch" 17import api from "../api/$api"; 18 19const client = api(aspida()); 20 21export default defineComponent({ 22 name: "Profile", 23 24 setup() { 25 const { data, error } = useAspidaSWRV(client.user._userId(123), "get", { 26 query: { name: "mario" }, 27 }); 28 29 return { data, error }; 30 }, 31}); 32</script>
useAspidaSWRV(client.user._userId(123), { query })
is an alias of useAspidaSWRV(client.user._userId(123), "$get", { query })
src/index.vue
1<template> 2 <div> 3 <div v-if="error">failed to load</div> 4 <div v-if="!data">loading...</div> 5 <div v-else>hello {{ data.name }}</div> 6 </div> 7</template> 8 9<script lang="ts"> 10import { defineComponent } from "@vue/composition-api"; 11import useAspidaSWRV from "@aspida/swrv"; 12import aspida from "@aspida/axios"; // "@aspida/fetch", "@aspida/node-fetch" 13import api from "../api/$api"; 14 15const client = api(aspida()); 16 17export default defineComponent({ 18 name: "Profile", 19 20 setup() { 21 const { data, error } = useAspidaSWRV(client.user._userId(123), { 22 query: { name: "mario" }, 23 revalidateDebounce: 0, 24 }); 25 26 return { data, error }; 27 }, 28}); 29</script>
1const { data: user } = useAspidaSWRV(client.user); 2const { data } = useAspidaSWRV(() => user.value && client.articles, { 3 query: { userId: user?.id ?? 0 }, 4});
@aspida/swrv is licensed under a MIT License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
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