
Product
Socket Threat Intel Now Shows Which Malware Campaigns Were Blocked or Detected
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.
@cooklang/cooklang
Advanced tools
Official Cooklang parser - Rust-powered WASM implementation for high performance recipe parsing
Official Cooklang parser for JavaScript and TypeScript.
This is a high-performance WASM implementation powered by the Rust cooklang-rs parser. It provides fast, reliable recipe parsing with full support for the Cooklang specification.
npm install @cooklang/cooklang
import { Parser } from '@cooklang/cooklang';
const parser = new Parser();
const recipe = parser.parse(`
>> servings: 4
Add @salt and @pepper to taste.
Cook for ~{10%minutes}.
`);
console.log(recipe.sections[0].content);
This package uses WebAssembly for several key benefits:
If you're migrating from the previous TypeScript-native @cooklang/cooklang-ts package (v1.x), please see the Migration Guide.
Key differences:
@cooklang/cooklang-ts → @cooklang/cooklangimport { Parser } from '@cooklang/cooklang';
const parser = new Parser();
const recipe = parser.parse(recipeText);
The parsed recipe contains:
interface Recipe {
sections: Section[];
metadata: Record<string, string>;
ingredients: Ingredient[];
cookware: Cookware[];
timers: Timer[];
}
import {
ingredient_should_be_listed,
ingredient_display_name,
cookware_should_be_listed,
cookware_display_name,
quantity_display,
grouped_quantity_display,
grouped_quantity_is_empty
} from '@cooklang/cooklang';
Utility functions for working with quantities:
import { getNumericValue, extractNumericRange } from '@cooklang/cooklang';
const value = ingredient.quantity?.value;
const numeric = getNumericValue(value); // 2.5
const range = extractNumericRange(value); // { start: 2, end: 3 }
This package version tracks the Rust cooklang-rs version. For example:
@cooklang/cooklang@0.17.2 = Rust cooklang-rs@0.17.2We use 0.x versioning to match the Rust core library. The parser is production-ready and actively maintained. We'll bump to 1.0 when the Rust core reaches 1.0.
This package works in:
This package is part of the cooklang-rs monorepo. Contributions are welcome!
MIT - see LICENSE
FAQs
Official Cooklang parser - Rust-powered WASM implementation for high performance recipe parsing
The npm package @cooklang/cooklang receives a total of 0 weekly downloads. As such, @cooklang/cooklang popularity was classified as not popular.
We found that @cooklang/cooklang demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Product
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.

Security News
Fixes for eMudhra and Brotli are out. Getting them everywhere they’re needed means tracking down bundled libraries, runtimes, and certificate stores.

Threat Research
/Security News
Socket uncovered secret-stealing workflows that ran in LiteLLM’s GitHub repository 11 days before the supply chain attack on PyPI and Docker.