@[email protected] 🍥 on Twitter / X
💩 /^class\\s+/.test(() = {}); 💩 /^class\\s+/.test(function () {}); 🎉 /^class\\s+/.test(class {}); this might be my new favorite way to understand if code my lib is running on has been transpiled or not: const ES2015 = /^class\\s+/.test(class {}); if (ES2015) {} else {/* IE */}