-
-
Couldn't load subscription status.
- Fork 676
Closed
Labels
Description
Feature suggestion
See
- Add
navigator.userAgentdenoland/deno#14362 - Add navigator.userAgent to qjs CLI quickjs-ng/quickjs#204
Deno and Bun execute AssemblyScript directly (after transforming or stripping types).
AssemblyScript process.stdin.read() is not the same as Node.js process.stdin.read(). String.UTF8 is not defined in Node.js or Deno.
The rational being able to use the same code that can be executed directly by JavaScript/TypeScript runtimes and compiled to WASM by asc.
Instead of using String.UTF8 as a condition
if(`${typeof String.UTF8}`) {
process.stdout.write("AssemblyScript Version 0.27.32");
} else {
process.stdout.write(navigator.userAgent);
}