UNPKG

@dulysse1/better-node

Version:

Improve Node types & add object properties

17 lines (16 loc) 278 B
try { Object.defineProperty(global.Array.prototype, "replace", { value: function (c, r) { for (let i = 0; i < this.length; i++) { if (this[i] === c) { this[i] = r; break; } } return this; }, }); } catch (error) { void 0; } module.exports = {};