From 402f03b087785de4118c2d8faec38b7f5c9002be Mon Sep 17 00:00:00 2001 From: Nahiyan Kamal Date: Wed, 9 Dec 2020 10:58:10 +0100 Subject: [PATCH] fix(docs): fix readme examples --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1004a67..500e8c8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

simple-wcswidth

-

🖥️ 💬 Simplified JS/TS implementation of wcswidth() written by Markus Kuhn in C

+

🖥️ 💬 Simplified JS/TS implementation of wcwidth/wcswidth written by Markus Kuhn in C

@@ -28,11 +28,13 @@ # Example Usage ```js -const { wcswidth } = require('simple-wcwidth'); +const { wcswidth, wcwidth } = require('simple-wcswidth'); console.log(wcswidth('Yes 重要')); // 8 console.log(wcswidth('请你')); // 4 console.log(wcswidth('Hi')); // 2 + +console.log(wcwidth('请'.charCodeAt(0))); // 2 ``` # What is simplified here?