Posted 23 April 2013 - 03:36 AM
I'm writing an extension to the OS api, adding a few useful functions. I want to implement a function to determine if an API is currently loaded, like this:
os.loadAPI("/rom/apis/sys")
if sys.apiLoaded("foo") then
foo.bar("foobar", "baz", "apple")
end
I know that os.loadAPI() doesn't do anything if an API is already loaded, so I can just put
os.loadAPI("foo")
at the top of my program, but I would really like to make my code look neater with this. It's not that important, but if anyone knows a way to do this, I would really appreciate it.