
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@arrangedev/jsonformer-ts
Advanced tools
This is a port of the Jsonformer library originally written in Python. This repo aims to replicate it as close as possible, allowing Typescript developers to take advantage of high-quality structured JSON outputs from language models.
Like the original, the following schema types are supported:
NPM:
npm i @arrangedev/jsonformer-ts
yarn:
yarn add @arrangedev/jsonformer-ts
Here's a basic example of jsonformer-ts in action:
async function main() {
console.log("Loading model and tokenizer...");
const model = await LlamaForCausalLM.from_pretrained(
"Xenova/TinyLlama-1.1B-Chat-v1.0",
{ model_file_name: "model" },
);
const tokenizer = await LlamaTokenizer.from_pretrained(
"Xenova/TinyLlama-1.1B-Chat-v1.0",
);
const schema = {
type: "object",
properties: {
name: { type: "string" },
age: { type: "number" },
is_student: { type: "boolean" },
courses: {
type: "array",
items: { type: "string" },
},
},
};
const prompt =
"Generate a person's information based on the following schema:";
console.log("Creating Jsonformer instance...");
const jsonformer = new Jsonformer(model, tokenizer, schema, prompt, {
debug: true,
});
console.log("Generating data...");
const result = await jsonformer.generate();
console.log("\nGenerated result:");
console.log(JSON.stringify(result, null, 2));
}
Run the example with:
yarn example:basic
This project is MIT licensed, like the original. See here for more information.
FAQs
Structured JSON outputs from LLMs
We found that @arrangedev/jsonformer-ts 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.