Skip to content

Commit

Permalink
fix(docs): fix readme examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ayonious committed Dec 9, 2020
1 parent 581dabd commit 402f03b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
@@ -1,5 +1,5 @@
<h1 align="center">simple-wcswidth</h1>
<h3 align="center"> 🖥️ 💬 Simplified JS/TS implementation of wcswidth() written by Markus Kuhn in C</h3>
<h3 align="center"> 🖥️ 💬 Simplified JS/TS implementation of wcwidth/wcswidth written by Markus Kuhn in C</h3>

<p align="center">
<a href="https://codecov.io/gh/ayonious/simple-wcswidth">
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit 402f03b

Please sign in to comment.