New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/client

Package Overview
Dependencies
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libsql/client - npm Package Compare versions

Comparing version 0.4.0-pre.2 to 0.4.0-pre.3

15

lib-cjs/sqlite3.js

@@ -203,3 +203,3 @@ "use strict";

if (Array.isArray(stmt.args)) {
args = stmt.args.map(valueToSql);
args = stmt.args.map((value) => valueToSql(value, intMode));
}

@@ -211,3 +211,3 @@ else {

? name.substring(1) : name;
args[argName] = valueToSql(stmt.args[name]);
args[argName] = valueToSql(stmt.args[name], intMode);
}

@@ -288,3 +288,3 @@ }

const maxSafeBigint = 9007199254740991n;
function valueToSql(value) {
function valueToSql(value, intMode) {
if (typeof value === "number") {

@@ -303,3 +303,10 @@ if (!Number.isFinite(value)) {

else if (typeof value === "boolean") {
return value ? 1n : 0n;
switch (intMode) {
case "bigint":
return value ? 1n : 0n;
case "string":
return value ? "1" : "0";
default:
return value ? 1 : 0;
}
}

@@ -306,0 +313,0 @@ else if (value instanceof ArrayBuffer) {

@@ -179,3 +179,3 @@ import Database from "libsql";

if (Array.isArray(stmt.args)) {
args = stmt.args.map(valueToSql);
args = stmt.args.map((value) => valueToSql(value, intMode));
}

@@ -187,3 +187,3 @@ else {

? name.substring(1) : name;
args[argName] = valueToSql(stmt.args[name]);
args[argName] = valueToSql(stmt.args[name], intMode);
}

@@ -264,3 +264,3 @@ }

const maxSafeBigint = 9007199254740991n;
function valueToSql(value) {
function valueToSql(value, intMode) {
if (typeof value === "number") {

@@ -279,3 +279,10 @@ if (!Number.isFinite(value)) {

else if (typeof value === "boolean") {
return value ? 1n : 0n;
switch (intMode) {
case "bigint":
return value ? 1n : 0n;
case "string":
return value ? "1" : "0";
default:
return value ? 1 : 0;
}
}

@@ -282,0 +289,0 @@ else if (value instanceof ArrayBuffer) {

{
"name": "@libsql/client",
"version": "0.4.0-pre.2",
"version": "0.4.0-pre.3",
"keywords": [

@@ -5,0 +5,0 @@ "libsql",

@@ -79,2 +79,3 @@ # JavaScript & TypeScript SDK for libSQL

```
You can also create an in-memory database by passing ':memory:' as url. This is useful for for testing purposes.

@@ -81,0 +82,0 @@ ### libSQL sqld instance

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