Any reason, why Ember expect Mixin, Service or environment App block approach to use generic functions.
It would have been more seamless experience for Object Oriented JavaScript developers coming to ember to have global functions usage through import of javascript files.
Any insights of ember thought process in not allowing direct js file import to use global functions would help a lot.
It doesn’t. You can export a function in a new file app/foo/bar.js and then import it in any other js file, like an Ember component or just foo/xyz.js. That is a generic export and import that does not rely on anything Ember-related. It is not a global function, but I don’t think that’s what you meant.
As rutinerad wrote, this is generic export that isn’t handled specially by Ember - you can export anything - string, array, object, function, etc… and it doesn’t have to be placed in the utils folder, you can place it anywhere.
Simply change the code to export an object with multiple functions: