Skip to content

Commit

Permalink
CBOR.version added
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberphone committed Sep 25, 2024
1 parent 351251d commit 9fcc801
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 6 deletions.
5 changes: 3 additions & 2 deletions build/document-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ <h3 id='toc'>Table of Contents</h3>
</li>
</ul>
${VERSION_INFO}
API version: 1.0.8<br>
Document version: 2024-09-23
API version: 1.0.8. Note that the current API version is accessible through
the static property <code>CBOR.version</code>.<br>
Document version: 2024-09-25
</body>
</html>
2 changes: 2 additions & 0 deletions doc/browser-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@
assertTrue("null2", array.get(4).isNull());
assertFalse("cmp2", CBOR.compareArrays(CBOR.diagDecode(CBOR.decode(cbor).toString()).encode(), bin));
assertTrue("version", CBOR.version == "1.0.8");
success();
`}
,
Expand Down
5 changes: 3 additions & 2 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,8 @@ <h3 id='main.deterministic'>8.&nbsp;&nbsp;Deterministic Encoding</h3>
</ul>
<h3 id='main.version'>9.&nbsp;&nbsp;Version</h3>

API version: 1.0.8<br>
Document version: 2024-09-22
API version: 1.0.8. Note that the current API version is accessible through
the static property <code>CBOR.version</code>.<br>
Document version: 2024-09-25
</body>
</html>
4 changes: 2 additions & 2 deletions doc/release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Updated documentation
2024-08-30 - 1.0.7
Improved code.

2024-09-22 - 1.0.8
getFloat16() added.
2024-09-25 - 1.0.8
getFloat16() and CBOR.version added.
4 changes: 4 additions & 0 deletions npm/cjs/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,10 @@ class CBOR {
return Uint8Array.from(atob(base64.replace(/-/g, '+').replace(/_/g, '/')),
c => c.charCodeAt(0));
}

static get version() {
return "1.0.8";
}
}

module.exports = CBOR;
4 changes: 4 additions & 0 deletions npm/mjs/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1820,4 +1820,8 @@ export default class CBOR {
return Uint8Array.from(atob(base64.replace(/-/g, '+').replace(/_/g, '/')),
c => c.charCodeAt(0));
}

static get version() {
return "1.0.8";
}
}
2 changes: 2 additions & 0 deletions npm/test-all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ assertFalse("null1", array.get(3).isNull());
assertTrue("null2", array.get(4).isNull());
assertFalse("cmp2", CBOR.compareArrays(CBOR.diagDecode(CBOR.decode(cbor).toString()).encode(), bin));
assertTrue("version", CBOR.version == "1.0.8");
success();
`}
,
Expand Down
4 changes: 4 additions & 0 deletions src/cbor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1820,4 +1820,8 @@ class CBOR {
return Uint8Array.from(atob(base64.replace(/-/g, '+').replace(/_/g, '/')),
c => c.charCodeAt(0));
}

static get version() {
return "1.0.8";
}
}
2 changes: 2 additions & 0 deletions test/miscellaneous.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ assertFalse("null1", array.get(3).isNull());
assertTrue("null2", array.get(4).isNull());
assertFalse("cmp2", CBOR.compareArrays(CBOR.diagDecode(CBOR.decode(cbor).toString()).encode(), bin));

assertTrue("version", CBOR.version == "1.0.8");

success();
2 changes: 2 additions & 0 deletions test/test-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ assertFalse("null1", array.get(3).isNull());
assertTrue("null2", array.get(4).isNull());
assertFalse("cmp2", CBOR.compareArrays(CBOR.diagDecode(CBOR.decode(cbor).toString()).encode(), bin));
assertTrue("version", CBOR.version == "1.0.8");
success();
`}
,
Expand Down

0 comments on commit 9fcc801

Please sign in to comment.