MCPcopy Create free account
hub / github.com/arethetypeswrong/arethetypeswrong.github.io / onCheck

Function onCheck

packages/web/src/main.ts:127–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127async function onCheck() {
128 if (!getState().packageInfo.parsed) {
129 return;
130 }
131 if (!getState().packageInfo.info) {
132 await getPackageInfo();
133 }
134 const { packageInfo } = getState();
135 if (packageInfo.info && packageInfo.parsed) {
136 updateState((state) => void (state.isLoading = true));
137 worker.postMessage({
138 kind: "check-package",
139 packageName: packageInfo.parsed.packageName,
140 version: packageInfo.parsed.version,
141 });
142 }
143}
144
145async function fetchPackageInfo({ packageName, version }: ParsedPackageSpec): Promise<PackageInfo> {
146 try {

Callers 1

main.tsFile · 0.85

Calls 3

getStateFunction · 0.90
updateStateFunction · 0.90
getPackageInfoFunction · 0.85

Tested by

no test coverage detected