This forum contains a good explanation of why certain liquid template keywords like: {{ template }} do not return what you expect in .js.liquid files. So don't use it to try to detect the template from within the .js.liquid files. Instead, in the theme.liquid template, in the head tag do something like this:

<script>
var template = {{ template | json }};
</script>

and then use that variable in your JavaScripts that you include externally, like so:

I need to read this and understand this. It explains how exporting several functions within a given JavaScript file and importing them into another works. It discusses the ES6 / ES2015 export / import syntax.

Cool tool that installs a workflow that shows up under 'Services' menu (on right mouse click) and allows you to do things such as selecting code syntax from a webpage, like a github page, and then paste that code as formatted, highlighted code onto programs like Apple Pages, Keynote, Microsoft Word, Photoshop,