base128-ascii 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/main.d.ts +5 -0
  2. package/main.js +3 -0
  3. package/package.json +1 -1
package/main.d.ts CHANGED
@@ -16,6 +16,11 @@ export declare class Base128Bytes {
16
16
  */
17
17
  toJSTemplateLiterals(): string;
18
18
 
19
+ /**
20
+ * Returns a base128 Uint8Array.
21
+ */
22
+ uint8Array(): Uint8Array<ArrayBufferLike>;
23
+
19
24
  /**
20
25
  * The ArrayBuffer instance referenced by the array.
21
26
  */
package/main.js CHANGED
@@ -20,6 +20,9 @@ export const Base128Bytes = (() => {
20
20
  )
21
21
  )}\``
22
22
  }
23
+ uint8Array() {
24
+ return new Uint8Array(this.buffer)
25
+ }
23
26
  }
24
27
  const p = Object.getPrototypeOf(Uint8Array.prototype)
25
28
  for (const key of ["buffer", "byteLength", "byteOffset", "length"]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "base128-ascii",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "author": "bddjr",
5
5
  "license": "Unlicense",
6
6
  "type": "module",