1
2
3
4
5
6
7
8
9
10
11
export const kyDoesNotWorkDemo = (async () => {
const ky = await import("npm:ky");
console.log("has get method:", ky.get === undefined ? "❌" : "✅");
console.log("has post method:", ky.get === undefined ? "❌" : "✅");
console.log(`available methods: [${Object.keys(ky).join(",")}]`);
const { post } = await import("npm:ky");
console.log(
"has post method if imported directly:",
post === undefined ? "❌" : "✅"
);
})();
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.