Skip to content

tobie/webidl-deps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Consumes a WebIDL AST and returns the list of external dependencies referenced along with those exposed by the WebIDL fragments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors