import { charWidth } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/workerd/cli.js";
Returns the width of a single character.
Examples
Example 1
Example 1
import { charWidth } from "@ayonli/jsext/cli";
console.log(charWidth("a")); // 1
console.log(charWidth("你")); // 2
console.log(charWidth("👋")); // 2
console.log(charWidth("♥")); // 1