From ff85091160af4613c0493ab1524196c649ab9e7f Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 5 Jan 2024 16:38:23 -0500 Subject: 2666 --- 2666/main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 2666/main.js (limited to '2666') diff --git a/2666/main.js b/2666/main.js new file mode 100755 index 0000000..8211bb7 --- /dev/null +++ b/2666/main.js @@ -0,0 +1,12 @@ +#!/usr/bin/env node +var once = function (fn) { + var called = false; + return function (...args) { + if (called) { + return undefined; + } else { + called = true; + return fn(...args); + } + }; +}; -- cgit v1.2.3