{ "module": { "name": "号码排序 / 乱序工具", "description": "手机号码升序排序或随机乱序" }, "example": "13800000000\n13800000001\n13800000002\n13800000003", "functions": { "run": { "parameters": [ { "name": "input", "type": "string", "description": "请输入号码列表" }, { "name": "shuffle", "type": "boolean", "description": "随机乱序", "default": false } ] } }, "download": { "download_button_text": "下载TXT文件", "copy_button_text": "复制排序结果", "filename": "排序文件.txt" }, "code": "onmessage=function(e){const{input,shuffle}=e.data;let arr=input.split(/\\n+/).filter(x=>x.trim());if(shuffle){arr.sort(()=>Math.random()-0.5);}else{arr.sort();}postMessage({output:arr.join('\\n')});}" }