
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
browser-dtector
Advanced tools
A Javascript library to detect browser, version and platform
Install via Package managers such as npm or yarn
npm install browser-dtector --save
# or
yarn add browser-dtector
or use cdn
Minified:
//cdn.jsdelivr.net/npm/browser-dtector@latest/browser-dtector.umd.min.js
Pretty Printed:
//cdn.jsdelivr.net/npm/browser-dtector@latest/browser-dtector.umd.js
This library is compiled to UMD format, you should be able to use it in both Node.js and browser.
import BrowserDtector from 'browser-dtector';
const browser = new BrowserDtector(window.navigator.userAgent);
browser.parseUserAgent();
Usage in Node.js:
Note: while using in nodejs, it is mandatory to input useragent.
const http = require('http');
const BrowserDtector = require('browser-dtector');
const browser = new BrowserDtector();
http.createServer((req, res)=> {
// get user-agent header
const ua = browser.parseUserAgent(req.headers['user-agent']);
// write the result as response
res.end(JSON.stringify(ua, null, 4));
})
.listen(8080, '127.0.0.1');
console.log('Server running at http://127.0.0.1:8080/');
Usage in HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>BrowserDtector</title>
</head>
<body>
Hello World!
<script src="//cdn.jsdelivr.net/npm/browser-dtector@latest/browser-dtector.min.js"></script>
<script>
const browser = new window.BrowserDtector(window.navigator.userAgent); // or new BrowserDtector()
console.log(browser.parseUserAgent())
</script>
</body>
</html>
Sample
import BrowserDtector from 'browser-dtector';
const browser = new BrowserDtector(window.navigator.userAgent);
browser.parseUserAgent();
parseUserAgent() [object]: Returns parsed useragent info
{
"name": "Google Chrome",
"platform": "Macintosh",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) ...",
"version": "71.0.3578.98",
"shortVersion": "71",
"isAndroid": false,
"isTablet": false,
"isMobile": false,
"isDesktop": true,
"isWebkit": true,
"isIE": false
}
getBrowserInfo() [object]: Returns a minimal and necessary browser info.
{
"name": "Google Chrome",
"platform": "Macintosh",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) ...",
"version": "71.0.3578.98",
"shortVersion": "71"
}
getBrowserName() [string]: Returns name of the browser. e.g. Google Chrome
getBrowserVersion() [string]: Returns complete browser version. e.g. 71.0.3578.98
getBrowserShortVersion() [string]: Returns shorter browser version. e.g. 71
getPlatformName() [string]: Returns name of the device e.g. Macintosh
Miscellaneous:
string]: Useragent for current instancestring]: Current version of browser-detector library.FAQs
A Javascript library to detect browser, version and platform
The npm package browser-dtector receives a total of 15,155 weekly downloads. As such, browser-dtector popularity was classified as popular.
We found that browser-dtector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.