From b8b7bdb65492ea71fced175f57a34e85097add3c Mon Sep 17 00:00:00 2001 From: Sam Thorogood Date: Fri, 1 Sep 2017 15:05:10 +1000 Subject: [PATCH] better instructions --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b941b8c..0f9fd3a 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It will create `TextEncoder` and `TextDecoder` if the symbols are missing on `wi ``` @@ -22,16 +22,14 @@ It will create `TextEncoder` and `TextDecoder` if the symbols are missing on `wi ## Node -Install via NPM or Yarn: - -```bash -yarn add fast-text-encoding -``` - -And then import purely for side effects: +Install via NPM or Yarn (name "fast-text-encoding"), and then import purely for side effects: ```js +// don't need to save this anywhere, just require before use require('fast-text-encoding'); + +const buffer = new TextEncoder().encode('Turn me into UTF-8!'); +// buffer is now a Uint8Array of [84, 117, 114, 110, ...] ``` # Supports