webidl-deps

0.1.3 • Public • Published

webidl-deps

Build Status

webidl-deps consumes a WebIDL AST and returns the list of external dependencies referenced along with those exposed by the AST.

Usage

Given the following WebIDL fragment:

[NoInterfaceObject]
interface GlobalFetch {
  Promise<Response> fetch(RequestInfo input, optional RequestInit init);
};
Window implements GlobalFetch;
WorkerGlobalScope implements GlobalFetch;
var ast = require("webidl2").parse(fragment);
var deps = require("webidl-deps");
deps(ast);

yields:

{
    "defined": [],
    "dependencies": [
        { "name": "Response" },
        { "name": "RequestInfo" },
        { "name": "RequestInit" },
        { "name": "Window" }
    ],
    "coreDependencies": []
}

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    11
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i webidl-deps

Weekly Downloads

11

Version

0.1.3

License

MIT

Last publish

Collaborators

  • tobie