InfiniteLoopBuster
Using Esprima to stop infinite loops before they happen.
Install / Use
/learn @codepen/InfiniteLoopBusterREADME
Infinite Loop Buster!
Stop infinite loops before they happen.
This takes a string of JavaScript and alters it to ensure that infinite loops are broken, but otherwise doesn't affect the code. The purpose is so you can run it without fear of freezing the browser. Online code editors like CodePen are the use-case.
This uses Esprima to create an abstract syntax tree out of the JavaScript and do the instrumenting. Esprima is the only dependency, it doesn't require any additional libraries to output back to a string of JavaScript.
Ariya Hidayat is the creator of Esprima, and largely wrote this version of the Infinite Loop Buster as well. Thanks so much, Ariya!
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
