ast-metadata-inferer

[![Test](https://github.com/amilajack/ast-metadata-inferer/actions/workflows/test.yml/badge.svg)](https://github.com/amilajack/ast-metadata-inferer/actions/workflows/test.yml)

MIT 23 个版本
安装
npm install ast-metadata-inferer
yarn add ast-metadata-inferer
pnpm add ast-metadata-inferer
bun add ast-metadata-inferer
README

ast-metadata-inferer

Test

A collection of metadata about browser API's. This collection is intended for tools that analyze JS. It currently supports more than 6,000 compatibility records.

For all the API's it supports, it gives the

  • AST node type of the API (MemberExpression, NewExpression, or CallExpression)
  • Determines if an API is statically invoked (ex. document.querySelector())
  • Determines if an API is a CSS or JS API
  • Provides compatibility information from @mdn/browser-compat-data

Usage

import AstMetadata from "ast-metadata-inferer";

const [firstRecord] = AstMetadata;
console.log(firstRecord);
// {
//   "language":"js-api",
//   "protoChain":["document","querySelector"],
//   "protoChainId":"document.querySelector",
//   "astNodeTypes":["MemberExpression"],
//   "isStatic":true,
//   "compat": {
//     support: {
//       chrome: {
//         version_added: "14"
//       },
//       chrome_android: { version_added: "18" },
//       ...
//     }
//   }
// }
版本列表
0.8.1 2024-12-11
0.8.0-1 2023-02-09
0.8.0-0 2023-02-09
0.8.0 2023-02-09
0.7.0 2021-08-19
0.6.0 2021-08-09
0.5.1 2021-07-18
0.5.0 2021-07-16
0.4.0-0 2020-06-27
0.4.0 2020-06-27
0.3.0-1 2020-06-10
0.3.0-0 2020-06-08
0.3.0 2020-06-10
0.2.0-0 2020-05-15
0.2.0 2020-05-24
0.1.1-3 2019-02-09
0.1.1-2 2019-02-09
0.1.1-1 2019-02-08
0.1.1-0 2019-02-08
0.1.1 2019-02-09
0.1.0 2019-02-08
0.0.1 2018-07-06
0.0.0 2018-06-29