0.3.0原版

This commit is contained in:
2026-07-19 19:10:32 +08:00
commit 0b6afa0665
39 changed files with 5690 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
export const normalizePort = (val: string) => {
const port = parseInt(val, 10);
if (isNaN(port)) {
// named pipe
return val;
}
if (port >= 0) {
// port number
return port;
}
return false;
}
export const waitMs = (ms: number) => {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
};