Compare commits

..

No commits in common. "main" and "0.6.0" have entirely different histories.
main ... 0.6.0

3 changed files with 3 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "@textplace/core", "name": "@textplace/core",
"version": "0.6.1", "version": "0.6.0",
"exports": "./src/mod.ts", "exports": "./src/mod.ts",
"imports": { "imports": {
"@std/cli": "jsr:@std/cli@1" "@std/cli": "jsr:@std/cli@1"

View file

@ -1,6 +1,6 @@
{ {
"name": "@textplace/core", "name": "@textplace/core",
"version": "0.6.1", "version": "0.6.0",
"description": "The core logic of TextPlace.", "description": "The core logic of TextPlace.",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",

View file

@ -1,8 +1,6 @@
import { unicodeWidth } from "@std/cli/unicode-width"; import { unicodeWidth } from "@std/cli/unicode-width";
const segmenter = /*#__PURE__*/ new Intl.Segmenter("en", { const segmenter = new Intl.Segmenter("en", { granularity: "grapheme" });
granularity: "grapheme",
});
export function getCharacterWidth(ch: string): number { export function getCharacterWidth(ch: string): number {
const segments = [...segmenter.segment(ch)]; const segments = [...segmenter.segment(ch)];