From d3adc16a08d95d6e331de55d7d3bf05a66a874a8 Mon Sep 17 00:00:00 2001 From: pack Date: Sun, 9 Aug 2026 10:54:08 +0000 Subject: stop tracking node_modules/ --- node_modules/undici/lib/web/eventsource/util.js | 37 ------------------------- 1 file changed, 37 deletions(-) delete mode 100644 node_modules/undici/lib/web/eventsource/util.js (limited to 'node_modules/undici/lib/web/eventsource/util.js') diff --git a/node_modules/undici/lib/web/eventsource/util.js b/node_modules/undici/lib/web/eventsource/util.js deleted file mode 100644 index 727d866..0000000 --- a/node_modules/undici/lib/web/eventsource/util.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} -- cgit v1.2.3