Skip to content

Commit

Permalink
nodeJS buffer note
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor authored Sep 4, 2017
1 parent 40eba03 commit 227d7d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const buffer = new TextEncoder().encode('Turn me into UTF-8!');
// buffer is now a Uint8Array of [84, 117, 114, 110, ...]
```

However, note that `Buffer.from('Turn me into UTF-8!')` is Node's native version of the text encoding functionality.
You can probably massage [`Buffer`](https://nodejs.org/api/buffer.html) into acting like `TextEncoder` and `TextDecoder`.

# Supports

Built for IE11, Edge and Node environments.
Expand All @@ -48,4 +51,4 @@ Compile code with [Closure Compiler](https://closure-compiler.appspot.com/home).
// ==/ClosureCompiler==
// code here
```
```

0 comments on commit 227d7d2

Please sign in to comment.