Skip to content

Commit d64ddfd

Browse files
authored
Update README.md
1 parent 1ac3ccf commit d64ddfd

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,34 @@ Thus, in NodeJS, you do not ever have to use `new` just to get the encoder/decod
8383
```
8484

8585
```Javascript
86-
// Variation 3
86+
// Variation 3 (a rewording of Variation 2)
8787
const encodeAndDecodeModule = require("fastestsmallesttextencoderdecoder");
8888
const encode = encodeAndDecodeModule.encode;
8989
const decode = encodeAndDecodeModule.decode;
9090
```
9191

92+
Or, you can use the new and shiny [ES6 module importation](https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/import) statements.
93+
94+
95+
```Javascript
96+
// Variation 1
97+
import {TextEncoder, TextDecoder} from "fastestsmallesttextencoderdecoder";
98+
const encode = (new TextEncoder).encode;
99+
const decode = (new TextDecoder).decode;
100+
```
101+
102+
```Javascript
103+
// Variation 2
104+
import {encode, decode} from "fastestsmallesttextencoderdecoder";
105+
```
106+
107+
```Javascript
108+
// Variation 3 (a rewording of Variation 2)
109+
import * as encodeAndDecodeModule from "fastestsmallesttextencoderdecoder";
110+
const encode = encodeAndDecodeModule.encode;
111+
const decode = encodeAndDecodeModule.decode;
112+
```
113+
92114
Note that *fastestsmallesttextencoderdecoder* must be installed via the following snippet in the terminal in order for the `require("fastestsmallesttextencoderdecoder")` to work.
93115

94116
```Bash
@@ -102,3 +124,18 @@ Visit the [GithubPage](https://anonyco.github.io/FastestSmallestTextEncoderDecod
102124
## NPM Project
103125
You can find this project on [npm here at this link](https://npmjs.org/package/fastestsmallesttextencoderdecoder).
104126

127+
# Development
128+
129+
Develop the project on your own by cloning it with the following command line.
130+
131+
```Bash
132+
git clone https://github.com/anonyco/FastestSmallestTextEncoderDecoder.git; cd FastestSmallestTextEncoderDecoder; npm run install-dev
133+
```
134+
135+
Now that it is cloned, edit the files as you see fit. Now that the files have been edited, run the following in order to build the project.
136+
137+
```Bash
138+
git clone https://github.com/anonyco/FastestSmallestTextEncoderDecoder.git; cd FastestSmallestTextEncoderDecoder; npm run install-dev
139+
```
140+
141+

0 commit comments

Comments
 (0)