Fix bad regex replace in latest post

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2024-05-22 04:41:22 +02:00
parent fc73065a93
commit 3b410cf30a
@@ -6,7 +6,7 @@ tags: ["JavaScript", "Array", "Shallow-Clone", "Clone", "Duplicate", "ECMAScript
<p class="block">The Discord Servers I'm a moderator in have a bit of a spam bot problem lately, where bots join that never interact and only spam user's DMs. While I could wait until Discord bans them, it's not exactly the best solution, so why not build my own bot to handle users that never interact? So I started building a bot using NodeJS and <i>discord.js</i>. It's been going great so far, but then my ADHD got the better of me when I wanted to know: What actually is the fastest way to clone an Array?</p><!--more-->
<p class="block">Searching for an answer, I stumbled on <a href="https://stackoverflow.com/questions/3978492/fastest-way-to-duplicate-an-array-in-javascript-slice-vs-for-loop" target="_blank">this StackOverflow question</a>. And as usual, almost all of the answers are simply regurgitated content with nothing to back it up. So with nothing else to do on a weekend, I threw my entire knowlEdge 124.0.2478.97 at the problem, wrote a benchmarking "tool", wrote several ways to do the same, and I think I found it.</p>
<p class="block">Searching for an answer, I stumbled on <a href="https://stackoverflow.com/questions/3978492/fastest-way-to-duplicate-an-array-in-javascript-slice-vs-for-loop" target="_blank">this StackOverflow question</a>. And as usual, almost all of the answers are simply regurgitated content with nothing to back it up. So with nothing else to do on a weekend, I threw my entire knowledge at the problem, wrote a benchmarking "tool", wrote several ways to do the same, and I think I found it.</p>
<h2 class="block">Coding a Benchmark</h2>
<alert class="block" data-type="notice">