This commit is contained in:
IDONTSUDO 2024-04-25 12:22:21 +03:00
parent e005a42254
commit e155b4a2a1
26 changed files with 468 additions and 36 deletions

View file

@ -54,7 +54,7 @@ export const ArrayExtensions = () => {
if ([].repeat === undefined) {
// eslint-disable-next-line no-extend-native
Array.prototype.repeat = function (quantity) {
return Array(quantity).fill(this[0]);
return Array(quantity).fill(this).flat(1);
};
}
};