Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@awslabs-community-fork/dynamodb-batch-iterator

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@awslabs-community-fork/dynamodb-batch-iterator - npm Package Compare versions

Comparing version 0.7.12 to 0.7.13

27

dist/lib/cjs/itemIdentifier.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.itemIdentifier = void 0;
const bytes = require('utf8-bytes');
const convertToBytes = (str) => {
var bytes = [];
for (var i = 0; i < str.length; i++) {
var c = str.charCodeAt(i);
if (c >= 0xd800 && c <= 0xdbff && i + 1 < str.length) {
var cn = str.charCodeAt(i + 1);
if (cn >= 0xdc00 && cn <= 0xdfff) {
var pt = (c - 0xd800) * 0x400 + cn - 0xdc00 + 0x10000;
bytes.push(0xf0 + Math.floor(pt / 64 / 64 / 64), 0x80 + Math.floor(pt / 64 / 64) % 64, 0x80 + Math.floor(pt / 64) % 64, 0x80 + pt % 64);
i += 1;
continue;
}
}
if (c >= 2048) {
bytes.push(0xe0 + Math.floor(c / 64 / 64), 0x80 + Math.floor(c / 64) % 64, 0x80 + c % 64);
}
else if (c >= 128) {
bytes.push(0xc0 + Math.floor(c / 64), 0x80 + c % 64);
}
else
bytes.push(c);
}
return bytes;
};
/**

@@ -39,3 +62,3 @@ * @internal

if (typeof value === 'string') {
return Uint8Array.from(bytes(value));
return Uint8Array.from(convertToBytes(value));
}

@@ -42,0 +65,0 @@ if (isArrayBuffer(value)) {

@@ -1,2 +0,25 @@

const bytes = require('utf8-bytes');
const convertToBytes = (str) => {
var bytes = [];
for (var i = 0; i < str.length; i++) {
var c = str.charCodeAt(i);
if (c >= 0xd800 && c <= 0xdbff && i + 1 < str.length) {
var cn = str.charCodeAt(i + 1);
if (cn >= 0xdc00 && cn <= 0xdfff) {
var pt = (c - 0xd800) * 0x400 + cn - 0xdc00 + 0x10000;
bytes.push(0xf0 + Math.floor(pt / 64 / 64 / 64), 0x80 + Math.floor(pt / 64 / 64) % 64, 0x80 + Math.floor(pt / 64) % 64, 0x80 + pt % 64);
i += 1;
continue;
}
}
if (c >= 2048) {
bytes.push(0xe0 + Math.floor(c / 64 / 64), 0x80 + Math.floor(c / 64) % 64, 0x80 + c % 64);
}
else if (c >= 128) {
bytes.push(0xc0 + Math.floor(c / 64), 0x80 + c % 64);
}
else
bytes.push(c);
}
return bytes;
};
/**

@@ -35,3 +58,3 @@ * @internal

if (typeof value === 'string') {
return Uint8Array.from(bytes(value));
return Uint8Array.from(convertToBytes(value));
}

@@ -38,0 +61,0 @@ if (isArrayBuffer(value)) {

7

package.json
{
"name": "@awslabs-community-fork/dynamodb-batch-iterator",
"version": "0.7.12",
"version": "0.7.13",
"description": "Abstraction for DynamoDB batch reads and writes for that handles batch splitting and partial retries with exponential backoff",

@@ -33,4 +33,3 @@ "keywords": [

"dependencies": {
"tslib": "^2.1.0",
"utf8-bytes": "^0.0.1"
"tslib": "^2.1.0"
},

@@ -69,3 +68,3 @@ "jest": {

},
"gitHead": "0c9d3205be36a616d9b59280e7cb874cf2c17624"
"gitHead": "10bc5499c70c6051b746f89c20b6f6d0b991ad4f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc