{"id":17399227,"url":"https://github.com/feross/connectivity","last_synced_at":"2025-04-12T22:54:58.087Z","repository":{"id":16047047,"uuid":"18791025","full_name":"feross/connectivity","owner":"feross","description":"Detect if the network is up (do we have connectivity?)","archived":false,"fork":false,"pushed_at":"2024-06-29T07:56:50.000Z","size":76,"stargazers_count":61,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T22:54:56.621Z","etag":null,"topics":["browser","browserify","connection","detect","javascript","network","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"feross"}},"created_at":"2014-04-15T07:20:03.000Z","updated_at":"2025-03-04T08:01:14.000Z","dependencies_parsed_at":"2024-11-13T09:49:05.545Z","dependency_job_id":null,"html_url":"https://github.com/feross/connectivity","commit_stats":{"total_commits":24,"total_committers":4,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"9f2ab590bf28d147f9f367a1cfe8a725bf74a2d2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fconnectivity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fconnectivity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fconnectivity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fconnectivity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/connectivity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643048,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","browserify","connection","detect","javascript","network","nodejs"],"created_at":"2024-10-16T15:13:34.298Z","updated_at":"2025-04-12T22:54:58.064Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","readme":"# connectivity [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/connectivity/master.svg\n[travis-url]: https://travis-ci.org/feross/connectivity\n[npm-image]: https://img.shields.io/npm/v/connectivity.svg\n[npm-url]: https://npmjs.org/package/connectivity\n[downloads-image]: https://img.shields.io/npm/dm/connectivity.svg\n[downloads-url]: https://npmjs.org/package/connectivity\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### Detect if the network is up (do we have connectivity?)\n\n![internet!](https://raw.githubusercontent.com/feross/connectivity/master/img.jpg)\n\nThe module answers the most important question: is the cat-picture delivery system working?\n\n### usage\n\n```js\nvar connectivity = require('connectivity')\n\nconnectivity(function (online) {\n  if (online) {\n    console.log('connected to the internet!')\n  } else {\n    console.error('sorry, not connected!')\n  }\n})\n```\n\nAlso works in the browser with [browserify](http://browserify.org/)!\n\n### license\n\nMIT. Copyright [Feross Aboukhadijeh](https://www.twitter.com/feross).\n","funding_links":["https://github.com/sponsors/feross"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fconnectivity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Fconnectivity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fconnectivity/lists"}