
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@caolan/timi
Advanced tools
A JavaScript library to build database-style indexes in memory. It uses B+trees with some advanced features:
Timi is written using plain JavaScript modules with no external dependencies.
Source code:
NPM package:
npm install @caolan/timi
import { Transaction, Index } from "timi.js";
// All data lives within a transaction.
const txn = new Transaction();
// Create an index.
const tasks = txn.create(new Index('number'));
// Add some data to the index.
tasks.put(txn, 1, 'Try Timi');
tasks.put(txn, 2, 'Have a cup of tea');
tasks.put(txn, 3, 'Eat some cake');
// Read a given key.
const description = tasks.get(txn, 2);
// Iterate over all entries
tasks.entries(txn, (id, description) => {
console.log(`${id}: ${description}`);
});
The unit tests are written for Deno.
deno test
Despite the extra features, Timi benchmarks favourably against all JavaScript B-tree/B+tree implementations that I've found. If you know of another library, or you believe I'm using a library incorrectly, please contact me so I can update the benchmarks.
There is no public issue tracker yet. I'd be grateful for an email with your bug reports or feedback. As with all my libraries, commercial support is available.
FAQs
JavaScript indexes with transactions
We found that @caolan/timi 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.