<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>JavaScript on roderick.dk</title>
    <link>https://roderick.dk/tags/javascript/</link>
    <description>Recent content in JavaScript on roderick.dk</description>
    <image>
      <title>roderick.dk</title>
      <url>https://roderick.dk/images/cv-og.png</url>
      <link>https://roderick.dk/images/cv-og.png</link>
    </image>
    <generator>Hugo -- 0.148.2</generator>
    <language>en-gb</language>
    <lastBuildDate>Mon, 06 Apr 2026 11:15:53 +0000</lastBuildDate>
    <atom:link href="https://roderick.dk/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Announcing idempot-js: Idempotency Middleware for Node.js, Bun, and Deno</title>
      <link>https://roderick.dk/posts/2026-04-06-announcing-idempot-js/</link>
      <pubDate>Mon, 06 Apr 2026 11:15:53 +0000</pubDate>
      <guid>https://roderick.dk/posts/2026-04-06-announcing-idempot-js/</guid>
      <description>Introducing idempot-js — IETF-compliant idempotency middleware for Express, Fastify, and Hono with pluggable storage backends.</description>
    </item>
    <item>
      <title>The reduce ({...spread}) anti-pattern</title>
      <link>https://roderick.dk/posts/2021-12-21-the-reduce-spread-anti-pattern/</link>
      <pubDate>Tue, 21 Dec 2021 09:50:00 +0100</pubDate>
      <guid>https://roderick.dk/posts/2021-12-21-the-reduce-spread-anti-pattern/</guid>
      <description>&lt;p&gt;I thought this was a really interesting examination of the performance penalties of using &lt;code&gt;({...spread})&lt;/code&gt; in JavaScript.&lt;/p&gt;
&lt;p&gt;Link: &lt;a href=&#34;https://www.richsnapp.com/article/2019/06-09-reduce-spread-anti-pattern&#34;&gt;The reduce ({&amp;hellip;spread}) anti-pattern&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>JSDoc typings: all the benefits of TypeScript, with none of the drawbacks</title>
      <link>https://roderick.dk/posts/2021-07-20-jsdoc-typings-all-the-benefits-of-typescript-with-none-of-the-drawbacks/</link>
      <pubDate>Tue, 20 Jul 2021 14:30:00 +0200</pubDate>
      <guid>https://roderick.dk/posts/2021-07-20-jsdoc-typings-all-the-benefits-of-typescript-with-none-of-the-drawbacks/</guid>
      <description>&lt;p&gt;An in depth exploration of how far you can get with using JSDoc (and the TypeScript compiler) without resorting to writing TypeScript or having a build step in your project.&lt;/p&gt;
&lt;p&gt;Link: &lt;a href=&#34;https://gils-blog.tayar.org/posts/jsdoc-typings-all-the-benefits-none-of-the-drawbacks/&#34;&gt;JSDoc typings: all the benefits of TypeScript, with none of the drawbacks&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>The (extremely) loud minority</title>
      <link>https://roderick.dk/posts/2020-11-12-the-extremely-loud-minority/</link>
      <pubDate>Thu, 12 Nov 2020 20:58:00 +0100</pubDate>
      <guid>https://roderick.dk/posts/2020-11-12-the-extremely-loud-minority/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;It’s understandable to think that JavaScript frameworks and their communities are eating the web because places like Twitter are &lt;em&gt;awash with very loud voices from said communities&lt;/em&gt;.
Always remember that although a &lt;strong&gt;subset of the JavaScript community can be very loud&lt;/strong&gt;, they represent a &lt;strong&gt;paltry portion of the web as a whole&lt;/strong&gt;. This means that when &lt;em&gt;they&lt;/em&gt; say something like &amp;ldquo;CSS sucks&amp;rdquo; — what they mean is &amp;ldquo;CSS sucks for a small subset of less than 1 percent of the web&amp;rdquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Avoid double exclamations in JavaScript</title>
      <link>https://roderick.dk/posts/2018-09-10-avoid-double-exlamations/</link>
      <pubDate>Mon, 10 Sep 2018 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2018-09-10-avoid-double-exlamations/</guid>
      <description>&lt;p&gt;There is a common misuse of JavaScript&amp;rsquo;s type coercion that I see in code reviews. It&amp;rsquo;s the terse use of two exclamation marks to convert a &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Glossary/Truthy&#34;&gt;truthy&lt;/a&gt; value to a &lt;code&gt;Boolean&lt;/code&gt; value.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;someValue&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;I like apple pie&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;userLikesPie&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;someValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// userLikesPie is now `true`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I think this is a misuse for two reasons:&lt;/p&gt;</description>
    </item>
    <item>
      <title>jQuery Data Link considered harmful</title>
      <link>https://roderick.dk/posts/2010-11-03-jquery-data-link-considered-harmful/</link>
      <pubDate>Wed, 03 Nov 2010 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2010-11-03-jquery-data-link-considered-harmful/</guid>
      <description>&lt;p&gt;&amp;ldquo;Considered harmful&amp;rdquo; has always been good link bait.&lt;/p&gt;
&lt;p&gt;I am not trying to start a flamewar, but merely express my concerns over the recent decisions of the jQuery team to actively endorse plugins that deserves no special treatment from any other plugins out there.&lt;/p&gt;
&lt;p&gt;If you have different opinions, please do respond in the comments or write a blog post expressing them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing PubSubJS, a library for doing publish/subscribe in JavaScript</title>
      <link>https://roderick.dk/posts/2010-10-12-introducing-pubsubjs-a-library-for-doing-publish-subscribe-in-javascript/</link>
      <pubDate>Tue, 12 Oct 2010 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2010-10-12-introducing-pubsubjs-a-library-for-doing-publish-subscribe-in-javascript/</guid>
      <description>&lt;p&gt;For quite a while, I have been working on a large web application for a client. For &lt;a href=&#34;http://en.wikipedia.org/wiki/Publish/subscribe&#34;&gt;publish/subscribe&lt;/a&gt; style messaging in the web frontend, we use jQuery custom events triggered on the body element. This is quite a neat trick to ensure loose coupling of modules, since you&amp;rsquo;re really just tracking what the user does, and not what module happened to generate the message.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing FailFast, a JavaScript library for failure</title>
      <link>https://roderick.dk/posts/2010-09-02-introducing-failfast-a-javascript-library-for-failure/</link>
      <pubDate>Thu, 02 Sep 2010 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2010-09-02-introducing-failfast-a-javascript-library-for-failure/</guid>
      <description>&lt;p&gt;Tomorrow I will be attending &lt;a href=&#34;http://2010.dconstruct.org/&#34;&gt;dConstruct 2010&lt;/a&gt;, which I am very excited about. I flew in a day early, so I could get some time to enjoy Brighton. One of the first stops has been &lt;a href=&#34;http://theskiff.org/&#34;&gt;The Skiff&lt;/a&gt;, &amp;ldquo;a nice little place to work in the middle of Brighton&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The Skiff is indeed a very nice place: very few interruptions and very friendly people. While sitting at my visitors desk, I&amp;rsquo;ve managed to finally finish a little JavaScript library, that has been a very long time in the making: &lt;a href=&#34;http://github.com/mroderick/FailFast&#34;&gt;FailFast&lt;/a&gt;. All it took was tidying up the documentation and writing the last few missing unit tests.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IE8 Getting EcmaScript 262 rev. 5 Compliant Native JSON</title>
      <link>https://roderick.dk/posts/2010-02-26-ie8-getting-ecmascript-262-rev5-compliant-native-json/</link>
      <pubDate>Fri, 26 Feb 2010 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2010-02-26-ie8-getting-ecmascript-262-rev5-compliant-native-json/</guid>
      <description>&lt;p&gt;Earlier this week, Microsoft posted an article with details on udpates to the native JSON implementation in IE8.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because of the new ECMAScript specification changes, some customers have reported issues. These issues are caused by deviations between the native JSON feature in Internet Explorer 8 and the final specification. An update is now available to address these customer issues and improve JSON interoperability of Internet Explorer 8. This update enables JSON interoperability of Internet Explorer 8 to keep in conformance with the new &amp;ldquo;ECMAScript, fifth edition&amp;rdquo; standard specification.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Combining JavaScript Files - Juicer vs Sprockets</title>
      <link>https://roderick.dk/posts/2009-10-04-combining-javascript-files-juicer-vs-sprockets/</link>
      <pubDate>Sun, 04 Oct 2009 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2009-10-04-combining-javascript-files-juicer-vs-sprockets/</guid>
      <description>&lt;p&gt;Currently working on a project that has well defined use of &amp;ldquo;namespaces&amp;rdquo; and structured use folders for its JavaScript files. I wanted to investigate the options for combining and minifying JavaScript files.&lt;/p&gt;
&lt;p&gt;I need a tool that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;can be run from command line (my team uses many different editors and IDEs)&lt;/li&gt;
&lt;li&gt;will work on both Windows and Unix based platforms&lt;/li&gt;
&lt;li&gt;does not require huge, obscure configuration files&lt;/li&gt;
&lt;li&gt;can merge sources recursively&lt;/li&gt;
&lt;li&gt;has an acceptable software license (MIT / Apache / BSD)&lt;/li&gt;
&lt;li&gt;is thorougly tested&lt;/li&gt;
&lt;li&gt;is extensible&lt;/li&gt;
&lt;li&gt;can work with any JavaScript framework&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I settled for trying out &lt;a href=&#34;http://github.com/cjohansen/juicer&#34;&gt;Juicer&lt;/a&gt; and &lt;a href=&#34;http://getsprockets.org&#34;&gt;Sprockets&lt;/a&gt;, since both tools met the requirements and were the only high-quality tools on my radar.&lt;/p&gt;</description>
    </item>
    <item>
      <title>TextMate snippet for creating Low Pro Behaviors</title>
      <link>https://roderick.dk/posts/2009-08-16-textmate-snippet-for-creating-low-pro-behaviors/</link>
      <pubDate>Sun, 16 Aug 2009 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2009-08-16-textmate-snippet-for-creating-low-pro-behaviors/</guid>
      <description>&lt;h2 id=&#34;behaviours&#34;&gt;Behaviours&lt;/h2&gt;
&lt;p&gt;To encapsulate complex javascript behaviour on websites, I have been using &lt;a href=&#34;http://www.danwebb.net/lowpro&#34;&gt;Dan Webb&amp;rsquo;s Low Pro&lt;/a&gt; library for several years. Low Pro allows you to create self-contained Behavior classes, which avoids polluting the global namespace with variables and makes for very easy re-use of code.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve previously given a little &lt;a href=&#34;http://roderick.dk/blog/2009/05/07/introduction-to-low-pro-for-prototype/&#34;&gt;introduction to Low Pro for Prototype&lt;/a&gt; at a local Meetup event, where I show an example of creating your own behaviours.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LowPro Updated for Firefox 3.5</title>
      <link>https://roderick.dk/posts/2009-07-02-lowpro-updated-for-firefox-3.5-compatibility/</link>
      <pubDate>Thu, 02 Jul 2009 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2009-07-02-lowpro-updated-for-firefox-3.5-compatibility/</guid>
      <description>&lt;p&gt;Firefox 3.5 was recently released, and offers significant updates. If you have not upgraded yet, you should &lt;a href=&#34;http://mozilla.org/firefox&#34;&gt;do so now&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the &lt;a href=&#34;http://groups.google.com/group/low-pro&#34;&gt;LowPro community&lt;/a&gt;, we have been tracking compatibility with the upcoming Firefox. The existing LowPro was compatible with Firefox 3.5RC2, but incompatible with the final release of Firefox 3.5.&lt;/p&gt;
&lt;p&gt;So, if you are using LowPro, &lt;em&gt;you should upgrade with a new version of LowPro today&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introduction to Low Pro for Prototype</title>
      <link>https://roderick.dk/posts/2009-05-07-introduction-to-low-pro-for-prototype/</link>
      <pubDate>Thu, 07 May 2009 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2009-05-07-introduction-to-low-pro-for-prototype/</guid>
      <description>&lt;p&gt;Tonight I gave a lightweight introduction to &lt;a href=&#34;http://lowprojs.com&#34;&gt;Low Pro&lt;/a&gt; for Prototype at the &lt;a href=&#34;http://www.meetup.com/The-Oresund-JavaScript-Meetup/&#34;&gt;Öresund JavaScript meetup&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For those that missed it, or just want to study the example again, you can &lt;a href=&#34;https://roderick.dk/presentations/introduction-to-low-pro-for-prototype/Introduction-to-Low-Pro-for-Prototype.pdf&#34;&gt;see the slides as a PDF&lt;/a&gt;, &lt;a href=&#34;https://roderick.dk/presentations/introduction-to-low-pro-for-prototype/intro.html&#34;&gt;see the sample&lt;/a&gt; or &lt;a href=&#34;presentations/introduction-to-low-pro-for-prototype/Introduction-to-Low-Pro-for-Prototype.zip&#34;&gt;download a zip file with everything&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The meetup was very informal and there were also two other presentations: Mats Bryntse gave an overview of &amp;ldquo;What&amp;rsquo;s new in EcmaScript 3.1&amp;rdquo; and Rasmus Olausson showed us a &amp;ldquo;Hello world with Google Web Toolkit&amp;rdquo; as well as how to beat his Sudoku webapp :-)&lt;/p&gt;</description>
    </item>
    <item>
      <title>IE6 Background flicker once again</title>
      <link>https://roderick.dk/posts/2009-03-27-ie6-background-flicker-once-again/</link>
      <pubDate>Fri, 27 Mar 2009 00:00:00 +0000</pubDate>
      <guid>https://roderick.dk/posts/2009-03-27-ie6-background-flicker-once-again/</guid>
      <description>&lt;p&gt;Every once in awhile you come across one of those Internet Explorer 6 issues that tries it&amp;rsquo;s hardest to be really annoying. Today was one of those days with IE.&lt;/p&gt;
&lt;p&gt;Having flown out to work directly with a client&amp;rsquo;s web team yesterday, I spent some time today cursing at IE6 and trying to deal with a weird flickering of the webpage, apparently caused by hovering over a menu.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
