</>PackageGraphPackageGraph

default-browser

npmv5.5.1TypeScript

Get 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.

2
Direct dependencies

Runtime packages this one declares itself.

2
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

9.9 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

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

MIT

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.

PackageWeekly downloadsDependentsLicenseLast release
default-browserthis page52.6M1MIT24 days ago
default-browser-id01MIT1 day ago
open130.4M4MIT1 day ago
plist14M2MIT1 day ago
happy-dom06MIT1 day ago
@zip.js/zip.js02BSD-3-Clause1 day ago

Dependencies

Declared by default-browser v5.5.1. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (2)

bundle-name ^4.1.0default-browser-id ^5.0.0

Dev (3)

ava ^6.0.1tsd ^0.30.0xo ^0.56.0

Used by

Popular packages that depend on default-browser.

Relationship graph

Dependencies (left) and dependents (right) of default-browser.

default-browser-idopendefault-browser
default-browser dependencies dependents

Frequently installed together

Release history

4 releases in the last two years, typically about 159 days apart.

Recent versions of default-browser
VersionPublishedSizeLicense
5.5.1latest24 days ago6.8 KBMIT
5.5.07 months ago6.7 KBMIT
5.4.09 months ago6.3 KBMIT
5.3.010 months ago5.8 KBMIT
5.2.12 years ago5.7 KBMIT
5.2.02 years ago5.7 KBMIT
5.1.03 years ago5.4 KBMIT
5.0.03 years ago5.2 KBMIT
4.0.03 years ago5.1 KBMIT
3.1.04 years ago4.8 KBMIT
3.0.05 years ago4.8 KBMIT
2.0.110 years agoMIT
2.0.010 years agoMIT
1.0.012 years agoMIT
0.1.112 years agoMIT

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

Keywords

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.