
Security News
TC39 Advances Temporal to Stage 4 Alongside Several ECMAScript Proposals
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.
embeddings-utils
Advanced tools
A typescript library to split your long texts into smaller chunks to send them to OpenAI Embeddings API
embeddings-splitter
A typescript library to split texts into chunks so they can be embedded with OpenAI Embeddings API
Request Featurenpm i embeddings-splitter
split makes sure your string will are short enough to be embedded. (default split size is 500 tokens, but you OpenAI embeddings allow you to go up to 8191)
import { split } from 'embeddings-splitter';
const chunks = split('somVeryLongText...');
// example with biggest chunk size
const chunks = split('someVeryLongText', 8191)
// now you can send these chunks to be embedded
This is useful when you want to do generative search.
import { merge } from 'embeddings-splitter';
const chunks = ['i am a text', 'that needs to be interpreted as one ', 'for a prompt to make sense'];
const context = merge(chunks);
// e.g. of what to do with merged array
const question = 'what is this text about?"
const prompt = Answer the question based on the context below, and if the question can't be answered based on the context, say "I don't know"\n\nContext: ${context}\n\n---\n\nQuestion: ${question}\nAnswer:
createCompletion(prompt)
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2023 Different AI
FAQs
A typescript library to split your long texts into smaller chunks to send them to OpenAI Embeddings API
The npm package embeddings-utils receives a total of 1 weekly downloads. As such, embeddings-utils popularity was classified as not popular.
We found that embeddings-utils 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
TC39’s March 2026 meeting advanced eight ECMAScript proposals, including Temporal reaching Stage 4 and securing its place in the ECMAScript 2026 specification.

Research
/Security News
Since January 31, 2026, we identified at least 72 additional malicious Open VSX extensions, including transitive GlassWorm loader extensions targeting developers.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.