Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-async-methods

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-async-methods - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

14

index.js

@@ -170,4 +170,8 @@ 'use strict'

for (var key in asyncMethods) {
Vue.util.defineReactive(this, key, {
execute: wrapMethod(asyncMethods[key], this, key),
var func = wrapMethod(asyncMethods[key], this, key)
Vue.util.defineReactive(this, key, func)
var extra = {
execute: func,
promise: null,

@@ -183,3 +187,7 @@ isCalled: false,

handleErrorInView: false
})
}
for (var prop in extra) {
Vue.util.defineReactive(func, prop, extra[prop])
}

@@ -186,0 +194,0 @@ // add computed

{
"name": "vue-async-methods",
"version": "0.8.1",
"version": "0.9.0",
"description": "Vue async methods support",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -65,3 +65,4 @@ # vue-async-methods [![Build Status](https://travis-ci.org/mokkabonna/vue-async-methods.svg?branch=master)](https://travis-ci.org/mokkabonna/vue-async-methods)

articles // this is a computed that aliases fetchArticles.resolvedWith
fetchArticles.execute // executes the method
fetchArticles //call this function to fetch the articles
fetchArticles.execute // executes the method, legacy support
fetchArticles.promise // the current or last promise

@@ -82,3 +83,3 @@ fetchArticles.isCalled // false until first called

```html
<button type="button" @click="fetchArticles.execute">Load data</button>
<button type="button" @click="fetchArticles">Load data</button>
<div v-if="!fetchArticles.isCalled">Click button to load data</div>

@@ -85,0 +86,0 @@ <div v-if="fetchArticles.isPending">Loading data...</div>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc