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)
Last updated 4 years ago by amilajack .
MIT · Repository · Original npm
$ cnpm install ast-metadata-inferer 
SYNC missed versions from official npm registry.

ast-metadata-inferer

Test

A collection of metadata about browser API's. This collection is intended for tools that analyze JS. It currently supports 3993 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" },
//       ...
//     }
//   }
// }

Support

If this project is saving you (or your team) time, please consider supporting it on Patreon ???? thank you!

Related

Current Tags

  • 0.7.0                                ...           latest (4 years ago)
  • 0.4.0-0                                ...           next (5 years ago)

7 Versions

  • 0.7.0                                ...           4 years ago
  • 0.4.0-0                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.0-1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org