How can I check whether there is a bootstrap.js loaded on page (a file bootstrap.js may be compiled into another big JS file)?
You can retrieve elements and check their src attribute but as you pointed out, what you are looking for is the code itself and not a file name as the code may be in any file.
The best way to detect if a JavaScript service/class/etc. is loaded in a page, is to look for something in the DOM that you know is loaded by the given JS.
E.g. to detect if jQuery is loaded, you can do null !== window.jQuery or to find out the version of the loaded jQuery, jQuery.prototype.jquery