I want to make some functions available to all my arrays.
For instance, I want a function to remove duplicates:
Array.prototype.uniq = function () {
return Array.from(new Set(this));
};
Run Code Online (Sandbox Code Playgroud)
But I want to make this function work in my entire node.js project.
Will it work if I just put it in server.js which is run when I type npm start?
It would be great if it also works on the client. Is it possible or should I consider server …