I'm currently building a third party package and I want to add some prototypes but I don't know whether my prototypes would conflict users prototypes
for example, I have this prototype:
if (!Array.prototype.isDistinct) {
Array.prototype.isDistinct = function () {
return this.length === new Set(this).size
}
}
and the user has this prototype
if (!Array.prototype.isDistinct) {
Array.prototype.isDistinct = function () {
return 'test'
}
}
will my prototype overwrite users or any other third-party package prototypes?