{"id":22746147,"url":"https://github.com/rspack-contrib/browserslist-to-es-version","last_synced_at":"2025-04-14T10:13:53.344Z","repository":{"id":246789409,"uuid":"823135642","full_name":"rspack-contrib/browserslist-to-es-version","owner":"rspack-contrib","description":"Convert browserslist query to ECMAScript version.","archived":false,"fork":false,"pushed_at":"2025-04-01T03:11:27.000Z","size":66,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T10:13:47.340Z","etag":null,"topics":["browserslist","ecmascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rspack-contrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-02T13:17:28.000Z","updated_at":"2025-04-01T03:11:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"16f6ca3c-4c16-400a-a9f4-415aa5e9f533","html_url":"https://github.com/rspack-contrib/browserslist-to-es-version","commit_stats":null,"previous_names":["rspack-contrib/browserslist-to-es-version"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Fbrowserslist-to-es-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Fbrowserslist-to-es-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Fbrowserslist-to-es-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Fbrowserslist-to-es-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rspack-contrib","download_url":"https://codeload.github.com/rspack-contrib/browserslist-to-es-version/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860167,"owners_count":21173342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browserslist","ecmascript"],"created_at":"2024-12-11T02:11:41.138Z","updated_at":"2025-04-14T10:13:53.323Z","avatar_url":"https://github.com/rspack-contrib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# browserslist-to-es-version\n\nConvert [browserslist](https://github.com/browserslist/browserslist) query to ECMAScript version.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/browserslist-to-es-version\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/browserslist-to-es-version?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\nInstall:\n\n```bash\nnpm add browserslist-to-es-version -D\n```\n\nExample:\n\n```ts\nimport { browserslistToESVersion } from 'browserslist-to-es-version';\n\nconst esVersion = browserslistToESVersion([\n  \"chrome \u003e= 87\",\n  \"edge \u003e= 88\",\n  \"firefox \u003e= 78\",\n  \"safari \u003e= 14\",\n]);\n\nconsole.log(esVersion); // 2017\n```\n\n## Type\n\n```ts\n// Only supports ES5 ~ ES2018\ntype ESVersion = 5 | 2015 | 2016 | 2017 | 2018;\n\nfunction browserslistToESVersion(browsers: string[]): ESVersion;\n```\n\n## License\n\n[MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspack-contrib%2Fbrowserslist-to-es-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frspack-contrib%2Fbrowserslist-to-es-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspack-contrib%2Fbrowserslist-to-es-version/lists"}