Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserslist-to-es-version

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserslist-to-es-version

Convert [browserslist](https://github.com/browserslist/browserslist) query to ECMAScript version.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3K
decreased by-45.65%
Maintainers
0
Weekly downloads
 
Created
Source

browserslist-to-es-version

Convert browserslist query to ECMAScript version.

npm version license

Usage

Install:

npm add browserslist-to-es-version -D

Example:

import {browserslistToESVersion} from 'browserslist-to-es-version';

const esVersion = browserslistToESVersion([
  "chrome >= 87",
  "edge >= 88",
  "firefox >= 78",
  "safari >= 14",
]);

console.log(esVersion); // 2017

Type

// Only supports ES5 ~ ES2018
type ESVersion = 5 | 2015 | 2016 | 2017 | 2018;

function browserslistToESVersion(browsers: string[]): ESVersion;

License

MIT.

FAQs

Package last updated on 02 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc