This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit a6094cd
Showing
8 changed files
with
3,554 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules/ |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# chromium-detector | ||
Use feature detection to work out the running version of Chromium. No more UserAgent hackery! | ||
|
||
## Demo | ||
Head over to [https://chromiumchecker.com](https://chromiumchecker.com). | ||
|
||
## Install | ||
|
||
```bash | ||
npm install chromium-detector | ||
``` | ||
|
||
## Features | ||
|
||
- Uses a known feature list to work out the running version of Chromium | ||
- Doesn't need to use the UserAgent or anything else that could be spoofed | ||
- Provides info on each feature detected for more comprehensive results | ||
|
||
## Usage | ||
|
||
```javascript | ||
var chromiumDetector = require('chromium-detector') | ||
console.log(chromiumDetector.getBrowserInfo()) | ||
/* | ||
{ | ||
isChromium: true, | ||
version: '89', | ||
couldBeOlder: false, | ||
couldBeNewer: false, | ||
tests: { | ||
"89": { | ||
pass: 0, | ||
result: true, | ||
tests: [...], | ||
releaseDate: "2021-03-02", | ||
isPreRelease: false | ||
} | ||
} | ||
} | ||
*/ | ||
``` | ||
|
||
## API | ||
|
||
### getBrowserInfo() | ||
Returns: object with the following... | ||
|
||
* **isChromium**: `Boolean` true/false whether this looks to be Chromium | ||
* **version**: `String` the chromium milestone version (e.g. 89) or 'unknown' | ||
* **couldBeOlder**: `Boolean` true/false if the detected version of Chromium could be older than what the library can detect (i.e. all tests failed) | ||
* **couldBeNewer**: `Boolean` true/false if the detected version of Chromium could be newer than what the library can detect (i.e. all tests passed) | ||
* **tests**: `Object` an object of test results for each version |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.