bramus / caniuse-cli

Command line tool for “Can I Use …” and MDN Browser Compat Data
MIT License
203 stars 2 forks source link

Use native string repeat instead of custom #10

Closed Armanio closed 2 months ago

Armanio commented 2 months ago

Hi! What about native str.repeat? I think we can use it (https://caniuse.com/mdn-javascript_builtins_string_repeat).

bramus commented 2 months ago

Thanks for your PR, @Armanio!

While I certainly appreciate the upgrade here, it gave me an even better idea: use String#padStart and String#padEnd to achieve this. I added this in 8a30eaff82f47495cd5fb781d2e008ccd7491861, and will therefore be closing this PR.

Thanks again for the inspiration here!

Armanio commented 2 months ago

Glad I helped 👍