base128-ascii 3.1.0 → 3.1.1
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.
- package/main.js +5 -3
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const Base128Bytes = (() => {
|
|
4
4
|
class Base128Bytes {
|
|
5
5
|
constructor() {
|
|
6
|
-
return Reflect.construct(Uint8Array, arguments,
|
|
6
|
+
return Reflect.construct(Uint8Array, arguments, new.target)
|
|
7
7
|
}
|
|
8
8
|
toString() {
|
|
9
9
|
return new TextDecoder().decode(this)
|
|
@@ -21,8 +21,10 @@ export const Base128Bytes = (() => {
|
|
|
21
21
|
)}\``
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const p = Object.getPrototypeOf(Uint8Array.prototype)
|
|
25
|
+
for (const key of ["buffer", "byteLength", "byteOffset", "length"]) {
|
|
26
|
+
Object.defineProperty(Base128Bytes.prototype, key, Object.getOwnPropertyDescriptor(p, key))
|
|
27
|
+
}
|
|
26
28
|
return Base128Bytes
|
|
27
29
|
})()
|
|
28
30
|
|