I am building a set of utilities for my 'own use' app. Using ES2015, I wonder where I should create the utility functions as independent of each other within the module, ala =>
export const doSomething = () => {
... }
export const doSomethingElse = () => {
... }
My question is, is there any need for going the old fashioned way of creating a main object & then extending that object with all the utility functions? Ala =>
export const mainObj = function(){
... }
mainObj.prototype.doSomething = function(){
... }
mainObj.prototype.doSomethingElse = function(){
... }
Many thanks