vue-internet-checker
-
Check Internet Availability for your vue app
😃 . -
Get notifications regarding your internet Availability by using it. In needing of your feedback for my efforts.
😃 -
This is on GitHub so let me know if I've b0rked it somewhere, give me a star
⭐ if you like it🍻
Requirements
- Vue.js 2.x
✅ Install 👌
npm install vue-internet-checker
# or
yarn add vue-internet-checker
CDN: UNPKG | jsDelivr (available as window.vueInternetChecker
)
✅ Usage 🎓
Register the component globally:
Vue.component('vueInternetChecker', require('vue-internet-checker'));
Or use locally
import vueInternetChecker from 'vue-internet-checker';
✅ Example 🍀
template
<vue-internet-checker
@status="status"
@event="event"
/>
script
import vueInternetChecker from 'vue-internet-checker';
export default {
components: {
vueInternetChecker,
},
data: () => ({
onLine: null,
}),
methods: {
status(ele) {
console.log(ele);
this.onLine = ele;
},
event(ele) {
console.log(ele);
},
},
};
CSS
✅ 👂 Events
Name | Description |
---|---|
status |
Emits an Boolean value which can be used for multiple purposes in your app. |
event |
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
vue-internet-checker © Harsh Mendapara, Released under the MIT License.
Authored and maintained by Harsh Mendapara with help from contributors (list).
GitHub @Harsh Mendapara
Gmail @Harsh Mendapara
Linkedin @Harsh Mendapara
Facebook @Harsh Mendapara
Let's fly together :)