Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
libsql-stateless-easy
Advanced tools
thin libSQL stateless http driver for TypeScript and JavaScript but easy
Thin libSQL stateless HTTP driver for TypeScript and JavaScript for the edge but easy 🚀
@libsql/client/web
**except interactive transactions
.@libsql/client/web
, every function performs complete execution in exactly 1 roundtrip.libsql-stateless-easy
is simply a drop-in replacement and exactly same API as @libsql/client/web
.
$ npm i libsql-stateless-easy #pnpm, yarn, etc.
# or
$ bun add libsql-stateless-easy
libsql-stateless-easy
's client
has the exact same API as @libsql/client/web
's client
.
import { createClient } from "libsql-stateless-easy";
//or
const { createClient } = require("libsql-stateless-easy");
const client = createClient({
url: "https://da-fish-mandible.turso.io",
authToken: "fksdgfgksdgfksdg.javsdKDGKSBkgsdfg289374dg"
});
const res = await client.batch([
{
sql: "select * from contacts where contact_id = ?;",
args: [3]
},
"select first_name, last_name, email from contacts where contact_id = 2",
{
sql: "insert into contacts (contact_id,first_name,last_name,email,phone) values (?,?,?,?,?);",
args: [6,"glomm","feru","moca@doro.co","001"]
},
{
sql: "delete from contacts where contact_id = :kkl",
args: {kkl: 6}
}
]);
console.log(res);
const res2 = await client.execute({
sql: "select first_name, last_name, email, contact_id from contacts where contact_id = ?;",
args: [1]
});
console.log(res2);
const res3 = await client.serverOk();
if (res3) console.log("Server Compat Check OK");
else console.error("Server Compat Check NOT OK");
libsql-stateless-easy
's client
works with drizzle out-of-the-box.
import { createClient } from "libsql-stateless-easy";
import { drizzle } from 'drizzle-orm/libsql';
(async () => {
const client = createClient({
url: "https://da-fish-mandible.turso.io",
authToken: "fksdgfgksdgfksdg.javsdKDGKSBkgsdfg289374dg"
});
const db = drizzle(client);
const result = await db.select().from(table_name).all();
console.log(result);
})();
LibsqlError
API as @libsql/client
Feel free to explore them (however you dont need to as they've been neatly packaged into the client
)
import {
libsqlValueBuilder, libsqlStatementBuilder, libsqlBatchReqStepsBuilder, libsqlBatchReqStepExecCondBuilder, libsqlTransactionBeginStatement,
libsqlValueParser, libsqlStatementResParser, libsqlBatchStreamResParser, libsqlTransactionBatchStreamResParser,
libsqlExecute, //has easier API than `libsql-stateless`'s function of the same name
libsqlBatch, //has easier API than `libsql-stateless`'s function of the same name
libsqlServerCompatCheck, //has easier API than `libsql-stateless`'s function of the same name,
libsqlBatchTransaction, libsqlExecuteMultiple
createClient //used above
} from "libsql-stateless-easy";
NOTE: current API level is that of latest stable libsql-stateless.
Read this section.
FAQs
thin libSQL stateless http driver for TypeScript and JavaScript but easy
The npm package libsql-stateless-easy receives a total of 4,079,688 weekly downloads. As such, libsql-stateless-easy popularity was classified as popular.
We found that libsql-stateless-easy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.