Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wechat-miniprogram/miniprogram-compat
微信小程序 js 执行环境的兼容信息
https://github.com/wechat-miniprogram/miniprogram-compat
Last synced: 4 days ago
JSON representation
微信小程序 js 执行环境的兼容信息
- Host: GitHub
- URL: https://github.com/wechat-miniprogram/miniprogram-compat
- Owner: wechat-miniprogram
- Created: 2020-11-26T13:05:34.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T10:57:32.000Z (2 months ago)
- Last Synced: 2024-12-23T17:11:59.877Z (11 days ago)
- Language: JavaScript
- Homepage: https://wechat-miniprogram.github.io/miniprogram-compat/
- Size: 677 KB
- Stars: 82
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# miniprogram-compat
[在线支持度列表](https://wechat-miniprogram.github.io/miniprogram-compat/)
微信小程序 js 执行环境的兼容信息 [browserslist](https://github.com/browserslist/browserslist) 配置以及自带的 [polyfill](https://developers.weixin.qq.com/miniprogram/dev/framework/runtime/js-support.html) 信息
## 安装
```bash
npm install miniprogram-compat --save-dev
```## api
### `getBrowsersList(version: string): string[]`
获取小程序对应基础库的 browserslist 信息
### `getPolyfillInfo(version: string): { coreJsVersion: string; coreJsModules: string[] }`
获取小程序对应基础库的 polyfill 信息
- `coreJsVersion` 基础库内置的 core-js 版本号
- `coreJsModules` 基础库内置的 core-js 模块列表 (对应 core-js 3)