You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue-use-async

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-use-async - npm Package Compare versions

Comparing version

to
0.0.1

2

package.json
{
"name": "vue-use-async",
"version": "0.0.1-beta.1",
"version": "0.0.1",
"description": "Xhr and async helpers",

@@ -5,0 +5,0 @@ "repository": {

@@ -13,3 +13,5 @@ # Xhr helpers to use in back and client (VueJS) projects

# Usage
```javascript
import { Xhr, useXhr, useAsync } from 'vue-use-async';
```
- Xhr Class

@@ -28,11 +30,11 @@

promise,
} = get({ url: '/fake/get', cacheDuration: 200 });
} = get({ url: '/', cacheDuration: 200 });
```
E.g; In `setup`, a computed bearer token can be used. Each query has data bind to be used
directly in template.
A cache can be specified, during the duration an other query with same parameters will be
directly in a template.
A cache can be specified, therefore during this time an other query with same parameters will be
directly resolved.
- useAsync, similar to `useXhr`. Can resolve a function when computed parameters changed.
if `condition` is used, the function will wait `true` before be resolved.
- useAsync, similar to `useXhr` can resolve a function when computed parameters changed.
if `condition` is used, the function will wait `true` before being applied.
```javascript

@@ -39,0 +41,0 @@ const func = () => Promise.resolve('ok');

Sorry, the diff of this file is too big to display