Skip to content

Commit fadc20b

Browse files
committed
Update README.md
1 parent 0592b1f commit fadc20b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- **< 900 bytes** gzipped!
88
- No dependency
99
- Accepts base64url and replace non-url compatible chars with base64 standard chars
10-
- Add missing padding to base64 string
10+
- Adds missing padding to base64 string
1111
- Uses modern functions and shorter solutions
1212
- Supports ES modules, AMD, CommonJS and IIFE
1313

@@ -44,7 +44,7 @@ const buffer = base64ToArrayBuffer('base64 string here')
4444
```
4545
You can also use commonJS syntax with `require()`
4646

47-
Note ES Module syntax also works in modern browsers, you just need to add `type="module"` to your `<script>` tag.
47+
Note ES Module syntax also works in modern browsers. You just need to add `type="module"` to your `<script>` tag.
4848
```html
4949
<script type="module" src="..."></script>
5050
```
@@ -54,15 +54,15 @@ Note ES Module syntax also works in modern browsers, you just need to add `type=
5454
| Function name | Description |
5555
| --- | --- |
5656
| `base64ToUint8Array(base64String)` | base64 to Uint8Array |
57-
| `uint8ArrayToBase64(uint8Array)` | Uint8Array to Base64 (works with any TypedArray, you can use `typedArrayToBase64()` alias) |
58-
| `uint8ArrayToArrayBuffer(uint8Array)` | Uint8Array to ArrayBuffer (works with any TypedArray, you can use `typedArrayToArrayBuffer()` alias) |
57+
| `uint8ArrayToBase64(uint8Array)` | Uint8Array to Base64 (Works with any TypedArray. You can use `typedArrayToBase64()` alias.) |
58+
| `uint8ArrayToArrayBuffer(uint8Array)` | Uint8Array to ArrayBuffer (Works with any TypedArray. You can use `typedArrayToArrayBuffer()` alias.) |
5959
| `arrayBufferToUint8Array(arrayBuffer)` | ArrayBuffer to Uint8Array |
6060
| `base64ToArrayBuffer(base64String)` | base64 to ArrayBuffer |
6161
| `arrayBufferToBase64(arrayBuffer)` | ArrayBuffer to base64 |
6262

6363
## Useful case
6464

65-
An example for this library would be to convert a base64url VAPID application server key into an Uint8Array to suscribe to Web Push Notifications. You can achieve this by using `base64ToUint8Array(base64String)` function.
65+
An example for this library would be to convert a base64url VAPID application server key into an Uint8Array to subscribe to Web Push Notifications. You can achieve this by using `base64ToUint8Array(base64String)` function.
6666

6767
```js
6868
const { base64ToUint8Array } = base64u8ArrayBuffer
@@ -84,8 +84,8 @@ async function subscribeUserToPush(registration) {
8484
```txt
8585
RangeError: Maximum call stack size exceeded
8686
```
87-
This error occurs when using too large data (more than 30kb) to encode a base64 string (e.g, `uint8ArrayToBase64()` and `arrayBufferToBase64()`).
87+
This error occurs when using too large data (more than 30 kb) to encode a base64 string (e.g. `uint8ArrayToBase64()` and `arrayBufferToBase64()`).
8888

8989
## Tests
9090

91-
There is no tests for the moment.
91+
There are no tests for the moment.

0 commit comments

Comments
 (0)