How do I call a function from another Atom package?


#1

I want to call tree-view packages @getSelectedEntries function from my package.
I know to add tree-view as a package-dependency in package.json, but how do I call the function?


#2

So I worked it out.

You need to require atom-package-dependencies first, then call .require to access it.


#3

I realize that this is an old thread, but would you be willing to describe the process in a little more detail? I’m trying to currently call a command from another package for my package as well. Thanks.