Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle functions inside a global object? #80

Open
joedf opened this issue Apr 4, 2023 · 1 comment
Open

How to handle functions inside a global object? #80

joedf opened this issue Apr 4, 2023 · 1 comment

Comments

@joedf
Copy link

joedf commented Apr 4, 2023

How can I get functions defined in a object like to be mapped out? Currently, they are being ignored...
Here's some example code where MappedFunction() and anotherFunc() are succefully being included in the callgraph but nothing from Utils ... ? This was mostly done to keep the global namespace "clean"...

function MappedFunction(a, b, c) {
	anotherFunc();
	Utils.MyMethod1(1,2,3);
	Utils.MyMethod2(4,5,6);
}

const Utils = {
	MyMethod1: function(a, b, c) {
		// ...
		return value;
	},
	MyMethod2: function(a, b, c) {
		// ...
		return value;
	}
}
@scott-c-h
Copy link

This doesn't work for certain types of imports either.

from .my_module import utils
from .my_module import utils as mm_utils
from .my_module.utils import call3

def root():
  utils.call1()
  mm_utils.call2()
  call3()

only shows call3() in output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants