You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-13Lines changed: 25 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,24 +73,31 @@ As for NodeJS, calling `require("EncoderAndDecoderNodeJS.min.js")` yields the fo
73
73
```Javascript
74
74
module.exports= {
75
75
TextEncoder:functionTextEncoder(){/*...*/},
76
-
TextDecoder:functionTextDecoder(){/*...*/}
76
+
TextDecoder:functionTextDecoder(){/*...*/},
77
+
encode:TextEncoder.prototype.encode,
78
+
decode:TextDecoder.prototype.decode
77
79
}
78
80
```
79
81
80
-
All of the code snippets below function identically <sub>(aside from unused local variables introduced into the scope)</sub>.
82
+
In NodeJS, one does not ever have to use `new` just to get the encoder/decoder (although one still can do so if they want to). All of the code snippets below function identically <sub>(aside from unused local variables introduced into the scope)</sub>.
Or, one can use the new and shiny [ES6 module importation](https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/import) statements.
@@ -99,15 +106,20 @@ Or, one can use the new and shiny [ES6 module importation](https://developer.moz
0 commit comments