{"id":16905929,"url":"https://github.com/hopding/js-visualizer-9000-server","last_synced_at":"2025-06-15T14:34:13.157Z","repository":{"id":40743654,"uuid":"169253568","full_name":"Hopding/js-visualizer-9000-server","owner":"Hopding","description":"A NodeJS app that produces events to visualize JavaScript's Event Loop","archived":false,"fork":false,"pushed_at":"2022-09-28T13:11:12.000Z","size":65,"stargazers_count":130,"open_issues_count":5,"forks_count":38,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T09:22:27.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jsv9000.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hopding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["Hopding"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-02-05T14:25:11.000Z","updated_at":"2025-03-08T07:14:25.000Z","dependencies_parsed_at":"2023-01-18T09:49:22.650Z","dependency_job_id":null,"html_url":"https://github.com/Hopding/js-visualizer-9000-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopding%2Fjs-visualizer-9000-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopding%2Fjs-visualizer-9000-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopding%2Fjs-visualizer-9000-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopding%2Fjs-visualizer-9000-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hopding","download_url":"https://codeload.github.com/Hopding/js-visualizer-9000-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243986410,"owners_count":20379325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T18:40:15.285Z","updated_at":"2025-03-17T06:32:12.145Z","avatar_url":"https://github.com/Hopding.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Hopding"],"categories":[],"sub_categories":[],"readme":"# JavaScript Visualizer 9000 Server\n\nProduces events for code submitted by https://jsv9000.app. The repo for the client is [here](https://github.com/Hopding/js-visualizer-9000-client).\n\nFor example, upon receiving this input code:\n\n```js\nfunction logA() {\n  console.log('A');\n}\nfunction logB() {\n  console.log('B');\n}\nfunction logC() {\n  console.log('C');\n}\nfunction logD() {\n  console.log('D');\n}\n\n// Click the \"RUN\" button to learn how this works!\nlogA();\nsetTimeout(logB, 0);\nPromise.resolve().then(logC);\nlogD();\n\n// NOTE:\n//   This is an interactive vizualization. So try\n//   editing this code and see what happens. You\n//   can also try playing with some of the examples\n//   from the dropdown!\n```\n\nThe server logs the following:\n\n```\nReceived: {\"type\":\"RunCode\",\"payload\":\"function logA() { console.log('A') }\\nfunction logB() { console.log('B') }\\nfunction logC() { console.log('C') }\\nfunction logD() { console.log('D') }\\n\\n// Click the \\\"RUN\\\" button to learn how this works!\\nlogA();\\nsetTimeout(logB, 0);\\nPromise.resolve().then(logC);\\nlogD();\\n\\n// NOTE:\\n//   This is an interactive vizualization. So try \\n//   editing this code and see what happens. You\\n//   can also try playing with some of the examples \\n//   from the dropdown!\"}\nWorker MESSAGE: {\"type\":\"EnterFunction\",\"payload\":{\"id\":0,\"name\":\"logA\",\"start\":0,\"end\":36}}\nWorker MESSAGE: {\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"A\\n\"}}\nWorker MESSAGE: {\"type\":\"ExitFunction\",\"payload\":{\"id\":0,\"name\":\"logA\",\"start\":0,\"end\":36}}\nWorker MESSAGE: {\"type\":\"InitTimeout\",\"payload\":{\"id\":5,\"callbackName\":\"logB\"}}\nWorker MESSAGE: {\"type\":\"InitPromise\",\"payload\":{\"id\":6,\"parentId\":2}}\nWorker MESSAGE: {\"type\":\"ResolvePromise\",\"payload\":{\"id\":6}}\nWorker MESSAGE: {\"type\":\"InitPromise\",\"payload\":{\"id\":7,\"parentId\":6}}\nWorker MESSAGE: {\"type\":\"EnterFunction\",\"payload\":{\"id\":1,\"name\":\"logD\",\"start\":111,\"end\":147}}\nWorker MESSAGE: {\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"D\\n\"}}\nWorker MESSAGE: {\"type\":\"ExitFunction\",\"payload\":{\"id\":1,\"name\":\"logD\",\"start\":111,\"end\":147}}\nWorker MESSAGE: {\"type\":\"BeforePromise\",\"payload\":{\"id\":7}}\nWorker MESSAGE: {\"type\":\"EnterFunction\",\"payload\":{\"id\":2,\"name\":\"logC\",\"start\":74,\"end\":110}}\nWorker MESSAGE: {\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"C\\n\"}}\nWorker MESSAGE: {\"type\":\"ExitFunction\",\"payload\":{\"id\":2,\"name\":\"logC\",\"start\":74,\"end\":110}}\nWorker MESSAGE: {\"type\":\"ResolvePromise\",\"payload\":{\"id\":7}}\nWorker MESSAGE: {\"type\":\"AfterPromise\",\"payload\":{\"id\":7}}\nWorker MESSAGE: {\"type\":\"BeforeTimeout\",\"payload\":{\"id\":5}}\nWorker MESSAGE: {\"type\":\"EnterFunction\",\"payload\":{\"id\":3,\"name\":\"logB\",\"start\":37,\"end\":73}}\nWorker MESSAGE: {\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"B\\n\"}}\nWorker MESSAGE: {\"type\":\"ExitFunction\",\"payload\":{\"id\":3,\"name\":\"logB\",\"start\":37,\"end\":73}}\nWorker EXIT: 0\n{ resolvedPromiseIds: [ 6, 7 ],\n  promisesWithInvokedCallbacksInfo: [ { id: 7, name: 'logC' } ],\n  parentsIdsOfPromisesWithInvokedCallbacks: [ { id: 6, name: 'logC' } ] }\n[ '{\"type\":\"EnterFunction\",\"payload\":{\"id\":0,\"name\":\"logA\",\"start\":0,\"end\":36}}',\n  '{\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"A\\\\n\"}}',\n  '{\"type\":\"ExitFunction\",\"payload\":{\"id\":0,\"name\":\"logA\",\"start\":0,\"end\":36}}',\n  '{\"type\":\"InitTimeout\",\"payload\":{\"id\":5,\"callbackName\":\"logB\"}}',\n  '{\"type\":\"InitPromise\",\"payload\":{\"id\":6,\"parentId\":2}}',\n  '{\"type\":\"ResolvePromise\",\"payload\":{\"id\":6}}',\n  '{\"type\":\"EnqueueMicrotask\",\"payload\":{\"name\":\"logC\"}}',\n  '{\"type\":\"InitPromise\",\"payload\":{\"id\":7,\"parentId\":6}}',\n  '{\"type\":\"EnterFunction\",\"payload\":{\"id\":1,\"name\":\"logD\",\"start\":111,\"end\":147}}',\n  '{\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"D\\\\n\"}}',\n  '{\"type\":\"ExitFunction\",\"payload\":{\"id\":1,\"name\":\"logD\",\"start\":111,\"end\":147}}',\n  '{\"type\":\"BeforePromise\",\"payload\":{\"id\":7}}',\n  '{\"type\":\"DequeueMicrotask\",\"payload\":{}}',\n  '{\"type\":\"EnterFunction\",\"payload\":{\"id\":2,\"name\":\"logC\",\"start\":74,\"end\":110}}',\n  '{\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"C\\\\n\"}}',\n  '{\"type\":\"ExitFunction\",\"payload\":{\"id\":2,\"name\":\"logC\",\"start\":74,\"end\":110}}',\n  '{\"type\":\"ResolvePromise\",\"payload\":{\"id\":7}}',\n  '{\"type\":\"AfterPromise\",\"payload\":{\"id\":7}}',\n  '{\"type\":\"Rerender\",\"payload\":{}}',\n  '{\"type\":\"BeforeTimeout\",\"payload\":{\"id\":5}}',\n  '{\"type\":\"EnterFunction\",\"payload\":{\"id\":3,\"name\":\"logB\",\"start\":37,\"end\":73}}',\n  '{\"type\":\"ConsoleLog\",\"payload\":{\"message\":\"B\\\\n\"}}',\n  '{\"type\":\"ExitFunction\",\"payload\":{\"id\":3,\"name\":\"logB\",\"start\":37,\"end\":73}}' ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopding%2Fjs-visualizer-9000-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhopding%2Fjs-visualizer-9000-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopding%2Fjs-visualizer-9000-server/lists"}