npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

better-browserslist

v0.1.2

Published

## Why?

Downloads

3

Readme

Better browserslist

Why?

Depending on your babel setup, you won't have the same bundle same at the end. A big part of every builds are transpiled such as arrow functions. But nowadays, a lot of browsers supports those features.

Here is an example of different transpilations of a same input file with different targets in their babel configuration and the related coverage of this target among every browsers based on browserslist.

Results

source file length: 283 chars

modern

  • browserslist query: firefox >= 55, and_ff >= 55, chrome >= 60, and_chr >= 60, ios >= 12, safari >= 12, samsung >= 5, and_uc >= 11.8, opera >= 47, op_mob >= 47, baidu >= 7
  • browser coverage: 79.25%
  • output file: 334 chars (x1.18)

regular

  • browserslist query: edge >= 13, firefox >= 50, and_ff >= 50, chrome >= 49, and_chr >= 49, ios >= 9.4, safari >= 9.4, samsung >= 5, and_uc >= 11.8, opera >= 40, op_mob >= 40, baidu >= 7
  • browser coverage: 86.91%
  • output file: 1033 chars (x3.65)

regular_strict

  • browserslist query: edge >= 13, firefox >= 50, and_ff >= 50, chrome >= 49, and_chr >= 49, ios >= 9.4, safari >= 9.4, samsung >= 5, and_uc >= 11.8, opera >= 40, op_mob >= 40, baidu >= 7, not firefox >= 55, not and_ff >= 55, not chrome >= 60, not and_chr >= 60, not ios >= 12, not safari >= 12, not samsung >= 5, not and_uc >= 11.8, not opera >= 47, not op_mob >= 47, not baidu >= 7
  • browser coverage: 7.65%
  • output file: 1033 chars (x3.65)

not_modern

  • browserslist query: cover 100%, not firefox >= 55, not and_ff >= 55, not chrome >= 60, not and_chr >= 60, not ios >= 12, not safari >= 12, not samsung >= 5, not and_uc >= 11.8, not opera >= 47, not op_mob >= 47, not baidu >= 7
  • browser coverage: 16.35%
  • output file: 2372 chars (x8.38)

not_regular

  • browserslist query: cover 100%, not edge >= 13, not firefox >= 50, not and_ff >= 50, not chrome >= 49, not and_chr >= 49, not ios >= 9.4, not safari >= 9.4, not samsung >= 5, not and_uc >= 11.8, not opera >= 40, not op_mob >= 40, not baidu >= 7
  • browser coverage: 8.69%
  • output file: 2372 chars (x8.38)

defaults

  • browserslist query: defaults
  • browser coverage: 87.34%
  • output file: 2372 chars (x8.38)

How to use

const { modern, regular, regular_strict, not_modern, not_regular, old, oldest, defaults } = require('better-browserslist');

You can use one of those config in your own babel config.

old and oldest are respective aliases to regular_strict and not_regular

I recommend using modern, old or older.