From 9b23cf46e233615b7304c50d7fe58090fc9d781d Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:41:32 +0800 Subject: [PATCH] Update features.js --- src/lib/features.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/lib/features.js b/src/lib/features.js index 169f7fbb..f5e487f2 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -129,6 +129,21 @@ var featureInfos = return available; }, }, + ASYNC_FUNCTION: + { + description: 'Support for async functions, which return `Promise` object.', + check: + function () + { + try + { + Function('return async function(){}'); + return true; + } + catch (error) + { } + }, + }, ARROW: { description: 'Support for arrow functions.', @@ -506,6 +521,16 @@ var featureInfos = return available; }, }, + JAPANESE_INFINITY: + { + description: 'Japanese string representation of Infinity ended with "∞".', + check: + function () + { + var available = Infinity.toLocaleString('ja').slice(-1) === '∞'; + return available; + }, + }, LOCALE_INFINITY: { description: 'Language sensitive string representation of Infinity as "∞".',