
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Full documentation is available at docs.topk.io.
The TopK SDK is a fully TypeScript-compatible JavaScript client that brings together keyword and vector search, semantic search with automatic or user-defined embeddings, advanced metadata filtering, and built-in reranking.
Install the TopK SDK:
npm install topk-js
# or
yarn add topk-js
To authenticate with TopK, you'll need an API key:
Keep your API key secure—you'll need it for authentication.
Collections are the primary data structure in TopK. They store documents and enable queries.
import { Client } from "topk-js"
const client = new Client({
apiKey: "YOUR_TOPK_API_KEY",
region: "aws-us-east-1-elastica"
});
import { text, semanticIndex } from "topk-js/schema"
await client.collections().create("books", {
title: text().required().index(semanticIndex()), // Semantic search enabled on `title`
});
Note: Other fields can still be upserted even if they are not defined in the schema.
Now, add documents to the collection. Each document must have an _id field.
await client.collection("books").upsert([
{ _id: "gatsby", title: "The Great Gatsby" },
{ _id: "1984", title: "1984" },
{ _id: "catcher", title: "The Catcher in the Rye" },
]);
Now, retrieve books using semantic search:
import { select, fn, match, field } from "topk-js/query"
const results = await client.collection("books").query(
select({
title: field("title"),
// Perform semantic search on the `title` field
title_similarity: fn.semanticSimilarity(
"title",
"classic American novel"
),
})
// Sort results by the `title_similarity` field, selecting the top 10 results
.topk(field("title_similarity"), 10)
);
To remove the entire collection:
await client.collections().delete("books")
FAQs

The npm package topk-js receives a total of 49 weekly downloads. As such, topk-js popularity was classified as not popular.
We found that topk-js 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.