
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
=========
BsonicDB is a lightweight, high-performance, caching-based NoSQL database designed for efficient read and write operations. This database is optimized for both small and large data sets and supports various essential database operations like insert, update, find, and delete.
insertMany
).To install BsonicDB, run the following command:
npm install bsonicdb
Here's an example of how to use BsonicDB:
const BsonicDB = require('bsonicdb');
// Initialize the database with path and caching options
const db = new BsonicDB({
path: './data',
cacheDuration: 100, // Caches data for 100 milliseconds before writing to disk
});
// Initialize the database
db.initialize().then(async () => {
console.log('BsonicDB Initialized!');
// Insert a document into a collection
await db.insert('users', { name: 'John', age: 30 });
// Insert multiple documents into a collection
await db.insertMany('users', [
{ name: 'Alice', age: 25 },
{ name: 'Bob', age: 28 }
]);
// Find documents in a collection
const allUsers = await db.find('users', {});
console.log('All Users:', allUsers);
// Find specific documents with a query
const youngUsers = await db.find('users', { age: { $lt: 30 } });
console.log('Young Users:', youngUsers);
// Update a document
await db.update('users', { name: 'John' }, { age: 31 });
// Delete a document
await db.delete('users', { name: 'Bob' });
// Clear the entire collection
await db.clear('users');
});
FAQs
=========
The npm package bsonicdb receives a total of 12 weekly downloads. As such, bsonicdb popularity was classified as not popular.
We found that bsonicdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.