
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
import { openDb, add, count, destroy, update, find, all, whereEquals, whereNotEquals, whereContains } from "db";
const structure = [
{
version: 1,
migration(db) {
// could this have a nicer API?
const store = db.createObjectStore("todos", {
keyPath: "id",
autoIncrement: true,
});
store.createIndex("title", "title", { unique: false });
},
},
{
version: 2,
migration(db) {
const store = db.createObjectStore("todos", {
keyPath: "id",
autoIncrement: true,
});
store.createIndex("done", "done", { unique: false });
},
},
];
const db = await openDb("db-name", structure);
// new api. thought this would be better for tree-shaking 🤷♂️ need to test it.
// (db, storeName, arg)
await add(db, 'todos', todo); // Todo
await count(db, 'todos'); // Number
await destroy(db, 'todos', todo); // DeletedTodo
await update(db, 'todos', todo); // Todo
await find(db, 'todos', id); // Todo
await all(db, 'todos'); // [Todo]
await whereEquals(db, 'todos', "title", "hello"); // [Todo]
// should this be added as an arg to whereEquals({ ignoreCase: true }) and others?
await whereContains(db, 'todos', "title", "hello"); // [Todo]
await whereNotEquals(db, 'todos', "title", "hello"); // [Todo
// Pre 0.0.7 mabye?
//const { todos } = db.stores;
//
//await todos.add(todo); // Todo
//await todos.count(); // Number
//await todos.destroy(id); // DeletedTodo
//await todos.update(todo); // Todo
//await todos.find(id); // Todo
//await todos.all(); // [Todo]
//await todos.where("title").equals("hello", { ignoreCase: true }); // [Todo]
//await todos.where("title").contains("hello"); // [Todo]
//await todos.where("title").not.equals("hello"); // [Todo
//await todos.where("done").equals(false); // [Todo]
FAQs
a wrapper for indexedDB
We found that idx-db demonstrated a not healthy version release cadence and project activity because the last version was released 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.