If you want a function that will return the result of a PhantomJS script, you may find this handy.
It takes an array of options to be passed as arguments to the phantomJS file, executes it, and returns its results.
There are situations where you call a method which recalls itself multiple times, or calls other methods which recall the original method. But you want code of the original method execute only one time, and that, on the last call! What do you do?
If you want to find any given file inside a folder and its subfolders, you can do that with the code below.