Offline and Online network detection 🗼
npm install s-offline

















- Detect offline & online events for your Svelte app, inspired from v-offline
- Built from scratch using TypeScript
- s-offline ⚡️
- Features
- Table of Contents
- Demo
- Requirements
- Installation
- Build Setup
- Usage
- Example
- API
- Props
- Events
- Built with
- Contributing
- Author
- License

- Svelte 3
``sh`
npm install --save s-offline
CDN: UNPKG | jsDelivr (available as window.SOffline)
`bashinstall dependencies
$ npm ci
Usage
`javascript
import { SOffline } from 's-offline';
`#### Example
Detailed Example (refer App.svelte)
`html
pingUrl="https://bitly.com"
on:detectedCondition="{handleNetworkChange}"
>
😊
🤕
`API
$3
| Name | Type | Required? | Default | Description |
| --------- | ------ | --------- | ------------------ | -------------------------------------------------------- |
|
pingUrl | String | No | https://google.com | Pinging any url to double check if you're online or not. |$3
| Name | Returns | Description |
| ------------------- | ------- | --------------------- |
|
detectedCondition | String | Emits a boolean value |Built with
Contributing
1. Fork it ( https://github.com/vinayakkulkarni/s-offline/fork )
2. Create your feature branch (
git checkout -b feat/new-feature)
3. Commit your changes (git commit -Sam 'feat: add feature')
4. Push to the branch (git push origin feat/new-feature`)_Note_:
1. Please contribute using GitHub Flow
2. Commits & PRs will be allowed only if the commit messages & PR titles follow the conventional commit standard, _read more about it here_
3. PS. Ensure your commits are signed. _Read why_
s-offline © Vinayak, Released under the MIT License.
Authored and maintained by Vinayak Kulkarni with help from contributors (list).
> vinayakkulkarni.dev · GitHub @vinayakkulkarni · Twitter @\_vinayak_k
