Skip to content

Commit

Permalink
fix latitudegames#15 bump semi major version to 1.3.0 for possibly br…
Browse files Browse the repository at this point in the history
…eaking change but i think its actually mor widely compatible and should be fine.
  • Loading branch information
syonfox committed Jan 7, 2023
1 parent 1831e5b commit 66a189f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
8 changes: 3 additions & 5 deletions docs/Encoder.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ <h1 class="page-title">Source: Encoder.js</h1>
return String.fromCharCode(x)
}

const textEncoder = new TextEncoder("utf-8")
const encodeStr = str => {
return Array.from(textEncoder.encode(str)).map(x => x.toString())
return Array.from( Buffer.from(str, 'utf-8')).map(x => x.toString());
}

const textDecoder = new TextDecoder("utf-8")
const decodeStr = arr => {
return textDecoder.decode(new Uint8Array(arr));
return Buffer.from(arr).toString('utf-8')
}

const dictZip = (x, y) => {
Expand Down Expand Up @@ -327,7 +325,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Sun Dec 25 2022 12:21:34 GMT-0500 (Eastern Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Sat Jan 07 2023 18:07:39 GMT-0500 (Eastern Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
12 changes: 6 additions & 6 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line104">line 104</a>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line102">line 102</a>
</li></ul></dd>


Expand Down Expand Up @@ -374,7 +374,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line251">line 251</a>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line249">line 249</a>
</li></ul></dd>


Expand Down Expand Up @@ -529,7 +529,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line270">line 270</a>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line268">line 268</a>
</li></ul></dd>


Expand Down Expand Up @@ -688,7 +688,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line178">line 178</a>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line176">line 176</a>
</li></ul></dd>


Expand Down Expand Up @@ -948,7 +948,7 @@ <h5 class="subsection-title">Properties:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line210">line 210</a>
<a href="Encoder.js.html">Encoder.js</a>, <a href="Encoder.js.html#line208">line 208</a>
</li></ul></dd>


Expand Down Expand Up @@ -1022,7 +1022,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Sun Dec 25 2022 12:21:34 GMT-0500 (Eastern Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Sat Jan 07 2023 18:07:39 GMT-0500 (Eastern Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Sun Dec 25 2022 12:21:34 GMT-0500 (Eastern Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Sat Jan 07 2023 18:07:39 GMT-0500 (Eastern Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syonfox/gpt-3-encoder",
"version": "1.2.2",
"version": "1.3.0",
"description": "Javascript BPE Encoder Decoder for GPT-2 / GPT-3",
"main": "index.js",
"types": "./index.d.ts",
Expand Down

0 comments on commit 66a189f

Please sign in to comment.