Since you are the author of the Addin, I suggest that you pull the functions you want to be able to share, into a separate script, and save it as an independent script within the Addin. Then within the original script, you simply use an Include() to bring in the independent script.
For the non addin script, you will just use the method referenced by Ian, and get the directory the addin is save in, and then use an Include() to bring in the needed jsl that has the function in it.
Jim