I have a 'custom' directory where I would like to store any changes to the prototypes of built-in objects. Each built-in object that's modified will have its own file (i.e custom/String.js
for any modifications to String.prototype
).
In addition to these files, I will have a file called custom/All.js
which will be used to export the custom functionality to be used.
All.js
export * from './String'
export {Multiply} from './Array'
main.js
import * from './custom/All'
String.js
// something like this
export String.prototype.doSomething = function() {}
Can something like this be done?