Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
vue-promise-button
Advanced tools
A promise button for vuejs, handles buttons asynchronous lock and show loading state indicator
npm install vue-promise-button
or
yarn add vue-promise-button
import PromiseButton from 'vue-promise-button';
// For typescript users
import PromiseButton from 'vue-promise-button/src/components/PromiseButton.vue'
// Set global if you want
Vue.component('promise-button', PromiseButton);
// Use it
<promise-button class="button" :promise="promise">
I'm a promise button
</promise-button>
Setup your promise function as a promise like this.
export default {
methods: {
promise() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(true)
}, 2000)
})
}
}
}
With axios and api
export default {
methods: {
promise() {
return axios.get('/users/1234')
}
}
}
yarn install
yarn run serve
yarn run build
yarn run test
yarn run lint
yarn run test:unit
FAQs
A promise button for vuejs, handles buttons asynchronous lock and show loading state indicator
The npm package vue-promise-button receives a total of 0 weekly downloads. As such, vue-promise-button popularity was classified as not popular.
We found that vue-promise-button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.