So I have written a bunch of functions on arrays to use throughout my project. My functions are something simple like this
Array.prototype.mySort == function(){
return this.sort((a,b) => a.text < b.text ? -1 : 1)
}
I have them all written in a separate file called array-helper-functions
Now I want to be able to use them in other files like this
const transformedArray = myArray.map(something).mySort().filter(somethingElse)
how could I export them in source file and import them ?