Get Functions Metadata in Scripts

The built-in function get_fn_metadata_list returns an array of object maps, each containing the metadata of one script-defined function in scope.

Functions from the following sources are returned, in order:

  1. Encapsulated script environment (e.g. when loading a module from a script file),
  2. Current script,
  3. Modules imported via the import statement (latest imports first),
  4. Modules added via Engine::register_static_module (latest registrations first)

The return value is an array of object maps (so get_fn_metadata_list is also not available under no_index or no_object), containing the following fields.

namespacestringyesthe module namespace if the function is defined within a module
accessstringno"public" if the function is public,
"private" if it is private
namestringnofunction name
paramsarray of stringsnoparameter names
is_anonymousboolnois this function an anonymous function?