From c0dafe9f1c67b549dad3660e1d95d8665121ee16 Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Tue, 10 Dec 2024 15:37:09 +0100 Subject: [PATCH] Document the new conditional fastTimeout export (#2) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ca3e6f..ddfbee0 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Alternatively, if you are directly using the library as a browser embed: ## Compatibility -While `fastTimeout` is based on `postMessage`, it automatically falls back to `setImmediate` in environments where that function is defined. Hence, you can transparently use it in Node.js as well. +While `fastTimeout` is based on `postMessage`, it automatically falls back to `setImmediate` in environments where that function is defined. Hence, you can transparently use it in Node.js as well. In environments where neither `postMessage` nor `setImmediate` is defined, it falls back to plain `setTimeout`; you get a performance degradation in that case, but at least your code will still work. ## Reference