mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 12:10:24 +00:00
21 lines
486 B
JavaScript
21 lines
486 B
JavaScript
// src/utils/browser-compat.tsx
|
|
function getBrowserCompatibilityReport() {
|
|
const test = (snippet) => {
|
|
try {
|
|
(0, eval)(snippet);
|
|
return true;
|
|
} catch (e) {
|
|
return `FAILED: ${e}`;
|
|
}
|
|
};
|
|
return {
|
|
optionalChaining: test("({})?.b?.c"),
|
|
nullishCoalescing: test("0 ?? 1"),
|
|
weakRef: test("new WeakRef({})"),
|
|
cryptoUuid: test("crypto.randomUUID()")
|
|
};
|
|
}
|
|
export {
|
|
getBrowserCompatibilityReport
|
|
};
|
|
//# sourceMappingURL=browser-compat.js.map
|