-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9b5710
commit b0e3bd2
Showing
10 changed files
with
90 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,17 @@ | |
"contributors": [ | ||
"silverwind <[email protected]> (github.com/silverwind)" | ||
], | ||
"type": "module", | ||
"exports": { | ||
"types": "./index.d.ts", | ||
"node": "./index.js", | ||
"default": "./browser.js" | ||
}, | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=14.16" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava test.js && tsd" | ||
"test": "xo && ava && tsd" | ||
}, | ||
"files": [ | ||
"index.js", | ||
|
@@ -47,20 +53,19 @@ | |
"disconnected" | ||
], | ||
"dependencies": { | ||
"got": "^11.8.0", | ||
"p-any": "^3.0.0", | ||
"p-timeout": "^3.2.0", | ||
"public-ip": "^4.0.4" | ||
"got": "^12.1.0", | ||
"p-any": "^4.0.0", | ||
"p-timeout": "^5.1.0", | ||
"public-ip": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^2.4.0", | ||
"tsd": "^0.13.1", | ||
"xo": "^0.34.1" | ||
"ava": "^4.3.0", | ||
"tsd": "^0.20.0", | ||
"xo": "^0.49.0" | ||
}, | ||
"browser": "browser.js", | ||
"xo": { | ||
"rules": { | ||
"unicorn/prefer-optional-catch-binding": "off" | ||
} | ||
"ava": { | ||
"files": [ | ||
"test.js" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
// Need to test manually in DevTools | ||
// $ browserify test-browser.js | pbcopy | ||
'use strict'; | ||
const isOnline = require('./browser'); | ||
import isOnline from './browser.js'; | ||
|
||
(async () => { | ||
console.log('is online:', await isOnline()); | ||
})(); | ||
console.log('is online:', await isOnline()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters