default-browser
npmv5.5.1TypeScriptGet the default browser
Safe to adopt
Yes — default-browser scores well across adoption, maintenance, weight, supply chain, and licensing. 52.6M downloads per week and 1 known dependents. Last published 24 days ago. 4 releases in the last 2 years.
- AAdoption: grade A, Excellent.
52.6M downloads per week and 1 known dependents.
- AMaintenance: grade A, Excellent.
Last published 24 days ago. 4 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 2 transitive packages, about 9.9 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding default-browser to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing default-browser, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=18
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the default-browser README.
import defaultBrowser from 'default-browser';
console.log(await defaultBrowser());
//=> {name: 'Safari', id: 'com.apple.Safari'}default-browser vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| default-browserthis page | 52.6M | 1 | MIT | 24 days ago |
| default-browser-id | 0 | 1 | MIT | 1 day ago |
| open | 130.4M | 4 | MIT | 1 day ago |
| plist | 14M | 2 | MIT | 1 day ago |
| happy-dom | 0 | 6 | MIT | 1 day ago |
| @zip.js/zip.js | 0 | 2 | BSD-3-Clause | 1 day ago |
Dependencies
Declared by default-browser v5.5.1. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (3)
Used by
Popular packages that depend on default-browser.
Relationship graph
Dependencies (left) and dependents (right) of default-browser.
Frequently installed together
Utilities for working with Windows Subsystem for Linux (WSL)
TypeScript definitions for node
Check if the process is running inside a container (Docker/Podman)
Check if the process is running in an SSH session
Define a lazily evaluated property on an object
Release history
4 releases in the last two years, typically about 159 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.5.1latest | 24 days ago | 6.8 KB | MIT |
| 5.5.0 | 7 months ago | 6.7 KB | MIT |
| 5.4.0 | 9 months ago | 6.3 KB | MIT |
| 5.3.0 | 10 months ago | 5.8 KB | MIT |
| 5.2.1 | 2 years ago | 5.7 KB | MIT |
| 5.2.0 | 2 years ago | 5.7 KB | MIT |
| 5.1.0 | 3 years ago | 5.4 KB | MIT |
| 5.0.0 | 3 years ago | 5.2 KB | MIT |
| 4.0.0 | 3 years ago | 5.1 KB | MIT |
| 3.1.0 | 4 years ago | 4.8 KB | MIT |
| 3.0.0 | 5 years ago | 4.8 KB | MIT |
| 2.0.1 | 10 years ago | — | MIT |
| 2.0.0 | 10 years ago | — | MIT |
| 1.0.0 | 12 years ago | — | MIT |
| 0.1.1 | 12 years ago | — | MIT |
Overview
default-browser is an npm package that get the default browser. It is extremely widely used, with about 52.6M downloads per week and 1 known dependents in the graph. The latest version is 5.5.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get the default browser and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (52.6M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use default-browser?
Yes — default-browser scores well across adoption, maintenance, weight, supply chain, and licensing. 52.6M downloads per week and 1 known dependents. Last published 24 days ago. 4 releases in the last 2 years.
How do I install default-browser?
Run `npm install default-browser` to add default-browser to your npm project.
How many dependencies does default-browser have?
default-browser declares 5 direct dependencies and pulls in 2 packages in total once its runtime tree is resolved totalling about 9.9 KB on disk.
What license is default-browser released under?
default-browser is distributed under the MIT license.
How popular is default-browser?
default-browser has approximately 52,584,604 downloads per week and 1 known dependent packages.
Is default-browser still maintained?
The most recent release of default-browser (v5.5.1) was published 24 days ago.
Does default-browser run install scripts?
No. default-browser does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.