Minor renaming of variables

This commit is contained in:
Raymond Hill 2024-02-29 09:18:07 -05:00
parent ba95d2bc49
commit d7154de9e9
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 8 additions and 8 deletions

View File

@ -135,17 +135,17 @@ const cacheStorage = (( ) => {
return keys; return keys;
}, },
async set(inbin) { async set(rawbin) {
const keys = Object.keys(inbin); const keys = Object.keys(rawbin);
if ( keys.length === 0 ) { return; } if ( keys.length === 0 ) { return; }
const bin = {}; const serializedbin = {};
const promises = []; const promises = [];
for ( const key of keys ) { for ( const key of keys ) {
promises.push(compress(bin, key, inbin[key])); promises.push(compress(serializedbin, key, rawbin[key]));
} }
await Promise.all(promises); await Promise.all(promises);
cacheAPIs[fastCache].set(inbin, bin); cacheAPIs[fastCache].set(rawbin, serializedbin);
return extensionStorage.set(bin).catch(reason => { return extensionStorage.set(serializedbin).catch(reason => {
ubolog(reason); ubolog(reason);
}); });
}, },

View File

@ -224,7 +224,7 @@ const xtypeToSerializedInt = {
'[object DataView]': I_DATAVIEW, '[object DataView]': I_DATAVIEW,
}; };
const typeToSerializedChar = { const xtypeToSerializedChar = {
'[object Int8Array]': C_INT8ARRAY, '[object Int8Array]': C_INT8ARRAY,
'[object Uint8Array]': C_UINT8ARRAY, '[object Uint8Array]': C_UINT8ARRAY,
'[object Uint8ClampedArray]': C_UINT8CLAMPEDARRAY, '[object Uint8ClampedArray]': C_UINT8CLAMPEDARRAY,
@ -664,7 +664,7 @@ const _serialize = data => {
case I_FLOAT32ARRAY: case I_FLOAT32ARRAY:
case I_FLOAT64ARRAY: case I_FLOAT64ARRAY:
writeBuffer.push( writeBuffer.push(
typeToSerializedChar[xtypeName], xtypeToSerializedChar[xtypeName],
strFromLargeUint(data.byteOffset), strFromLargeUint(data.byteOffset),
strFromLargeUint(data.length) strFromLargeUint(data.length)
); );