Skip to content

Commit 447b5a9

Browse files
committed
style: apply format, move helia to top
1 parent 10e0a0d commit 447b5a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

example/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ declare global {
1515
}
1616
}
1717

18+
const helia = await createHelia();
19+
const fs = unixfs(helia);
20+
1821
const setSupported = <T extends FileSystemEntry | FileSystemHandle>(
1922
element: HTMLElement,
2023
sourceFn: (
@@ -59,8 +62,8 @@ const setSupported = <T extends FileSystemEntry | FileSystemHandle>(
5962
const message = {
6063
cid: f.cid.toString(),
6164
path: f.path,
62-
size: Number(f.size)
63-
}
65+
size: Number(f.size),
66+
};
6467
log(prefix + JSON.stringify(message));
6568
}
6669
}
@@ -100,6 +103,3 @@ function log(msg: string) {
100103
logDiv.appendChild(el);
101104
logDiv.scrollTop = logDiv.scrollHeight;
102105
}
103-
104-
const helia = await createHelia({ libp2p: undefined });
105-
const fs = unixfs(helia);

0 commit comments

Comments
 (0)