Skip to content

Commit

Permalink
indicate that encode, decode are exports
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Apr 16, 2020
1 parent 3dbe34b commit f3e84bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions text.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Object.defineProperty(FastTextEncoder.prototype, 'encoding', {value: 'utf-8'});
* @param {{stream: boolean}=} options
* @return {!Uint8Array}
*/
FastTextEncoder.prototype.encode = function(string, options={stream: false}) {
FastTextEncoder.prototype['encode'] = function(string, options={stream: false}) {
if (options.stream) {
throw new Error(`Failed to encode: the 'stream' option is unsupported.`);
}
Expand Down Expand Up @@ -135,7 +135,7 @@ Object.defineProperty(FastTextDecoder.prototype, 'ignoreBOM', {value: false});
* @param {{stream: boolean}=} options
* @return {string}
*/
FastTextDecoder.prototype.decode = function(buffer, options={stream: false}) {
FastTextDecoder.prototype['decode'] = function(buffer, options={stream: false}) {
if (options['stream']) {
throw new Error(`Failed to decode: the 'stream' option is unsupported.`);
}
Expand Down
7 changes: 5 additions & 2 deletions text.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions text.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f3e84bc

Please sign in to comment.