node-find-api
Finds all of the API calls and docs in a source file
This package is a highly-specialized, glorified regex engine that finds all API calls in a file.
For most languages, the documentation comment block starts with a double-star
block comment (e.g. /**
), though languages that do not have these style of
comments will require looking up the proper format in langs.js.
Example
var findAPI = ;var fs = ; var testJs = fs;var testC = fs; var jsAPIs = ;var cAPIs = ; /* test.js: [ { doc: "This is a documented function.", api: "var bar = function (a, b, c);" } ] test.c: [ { doc: "Documented function.", api: "struct some_struct_t *some_func(void);" } ]*/
test.js
/** * This is a documented function. */var { return a + b + c;};
test.c
/** Documented function. */struct some_struct_t *
License
Licensed under the MIT License. You can find a copy of it in LICENSE.