There are legacy ways to repeat string, we should replace them with .repeat()
, but this proposal is not about that. I want enforce .repeat()
for unreadable repeating string literals.
const string = ' '; // I can't see how many are there
const string = 'unicorn unicorn unicorn unicorn';
const string = ' '.repeat(4);
const string = 'unicorn '.repeat(4).trim(); // This?
const string = Array.from({length: 4}).fill('unicorn').join(' '); // Or this?
const string = Array.from({length: 4}, () => 'unicorn').join(' '); // Or this?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too