@bnaya/objectbuffer
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -146,3 +146,5 @@ import { ENTRY_TYPE } from "./entry-types"; | ||
cursor += Uint16Array.BYTES_PER_ELEMENT; | ||
entry.value = textDecoder.decode(dataView.buffer.slice(cursor, cursor + stringLength)); | ||
entry.value = textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + stringLength))); | ||
cursor += stringLength; | ||
@@ -172,3 +174,5 @@ break; | ||
const objectPropsValue = { | ||
key: textDecoder.decode(dataView.buffer.slice(cursor, cursor + keyStringLength)), | ||
key: textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + keyStringLength))), | ||
value: dataView.getUint32(cursor + keyStringLength), | ||
@@ -175,0 +179,0 @@ next: dataView.getUint32(cursor + keyStringLength + Uint32Array.BYTES_PER_ELEMENT) |
@@ -229,3 +229,5 @@ 'use strict'; | ||
cursor += Uint16Array.BYTES_PER_ELEMENT; | ||
entry.value = textDecoder.decode(dataView.buffer.slice(cursor, cursor + stringLength)); | ||
entry.value = textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + stringLength))); | ||
cursor += stringLength; | ||
@@ -255,3 +257,5 @@ break; | ||
const objectPropsValue = { | ||
key: textDecoder.decode(dataView.buffer.slice(cursor, cursor + keyStringLength)), | ||
key: textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + keyStringLength))), | ||
value: dataView.getUint32(cursor + keyStringLength), | ||
@@ -258,0 +262,0 @@ next: dataView.getUint32(cursor + keyStringLength + Uint32Array.BYTES_PER_ELEMENT) |
@@ -225,3 +225,5 @@ const primitives = ["string", "number", "bigint", "boolean", "undefined"]; | ||
cursor += Uint16Array.BYTES_PER_ELEMENT; | ||
entry.value = textDecoder.decode(dataView.buffer.slice(cursor, cursor + stringLength)); | ||
entry.value = textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + stringLength))); | ||
cursor += stringLength; | ||
@@ -251,3 +253,5 @@ break; | ||
const objectPropsValue = { | ||
key: textDecoder.decode(dataView.buffer.slice(cursor, cursor + keyStringLength)), | ||
key: textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + keyStringLength))), | ||
value: dataView.getUint32(cursor + keyStringLength), | ||
@@ -254,0 +258,0 @@ next: dataView.getUint32(cursor + keyStringLength + Uint32Array.BYTES_PER_ELEMENT) |
@@ -231,3 +231,5 @@ (function (global, factory) { | ||
cursor += Uint16Array.BYTES_PER_ELEMENT; | ||
entry.value = textDecoder.decode(dataView.buffer.slice(cursor, cursor + stringLength)); | ||
entry.value = textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + stringLength))); | ||
cursor += stringLength; | ||
@@ -257,3 +259,5 @@ break; | ||
const objectPropsValue = { | ||
key: textDecoder.decode(dataView.buffer.slice(cursor, cursor + keyStringLength)), | ||
key: textDecoder.decode( // this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + keyStringLength))), | ||
value: dataView.getUint32(cursor + keyStringLength), | ||
@@ -260,0 +264,0 @@ next: dataView.getUint32(cursor + keyStringLength + Uint32Array.BYTES_PER_ELEMENT) |
{ | ||
"name": "@bnaya/objectbuffer", | ||
"description": "Object like api, backed by an array buffer", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "dist/objectbuffer.cjs.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/index.js", |
@@ -180,3 +180,5 @@ import { ENTRY_TYPE } from "./entry-types"; | ||
entry.value = textDecoder.decode( | ||
dataView.buffer.slice(cursor, cursor + stringLength) | ||
// this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array(dataView.buffer.slice(cursor, cursor + stringLength)) | ||
); | ||
@@ -211,3 +213,7 @@ | ||
key: textDecoder.decode( | ||
dataView.buffer.slice(cursor, cursor + keyStringLength) | ||
// this wrapping is needed until: | ||
// https://github.com/whatwg/encoding/issues/172 | ||
new Uint8Array( | ||
dataView.buffer.slice(cursor, cursor + keyStringLength) | ||
) | ||
), | ||
@@ -214,0 +220,0 @@ value: dataView.getUint32(cursor + keyStringLength), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157434
4386