Skip to content

harshmendapara/vue-internet-checker

Repository files navigation

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

✅ 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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. 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 :)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published