
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@raven-js/cortex
Advanced tools
Zero-dependency machine learning, AI, and data processing library for modern JavaScript
Machine learning, data structures, and temporal computation without dependencies.
Platform-native algorithms using Math APIs and Node.js built-ins. Build neural networks, matrix operations, schema validation, and holiday calculations using pure JavaScript primitives.
Structured learning that adapts rather than couples to AI service evolution. Matrix operations optimized for V8 engine performance. Temporal computation with governmental precision across 30+ countries.
npm install @raven-js/cortex
// Neural networks and machine learning
import { NeuralNetwork, LinearRegression } from "@raven-js/cortex";
const nn = new NeuralNetwork([2, 4, 1]); // 2 inputs, 4 hidden, 1 output
nn.trainBatch(
[
[0, 0],
[0, 1],
[1, 0],
[1, 1],
],
[[0], [1], [1], [0]]
);
console.log(nn.predict([1, 0])); // XOR classification
const regression = new LinearRegression();
regression.trainBatch([
{ x: 1, y: 2 },
{ x: 2, y: 4 },
{ x: 3, y: 6 },
]);
console.log(regression.predict({ x: 4 })); // 8
// Matrix operations and data structures
import { Matrix, Schema } from "@raven-js/cortex";
const matrix = Matrix.random(3, 3);
const result = matrix.multiply(Matrix.identity(3));
console.log(result.toString());
class User extends Schema {
name = Schema.field("", { description: "User name" });
age = Schema.field(0, { description: "User age" });
}
const user = new User();
user.validate({ name: "Alice", age: 25 });
// Temporal computation with governmental precision
import {
calculateEasterSunday,
calculateHolidaysOfYear,
} from "@raven-js/cortex";
const easter2024 = calculateEasterSunday(2024);
console.log(easter2024); // 2024-03-31
const usHolidays = calculateHolidaysOfYear({
year: 2024,
country: "US",
region: "CA",
});
console.log(usHolidays.length); // Federal + California state holidays
// AI text detection with hierarchical cascade
import { isAIText } from "@raven-js/cortex";
import { GERMAN_LANGUAGE_PACK } from "@raven-js/cortex/language/languagepacks/german.js";
const result = isAIText(
"Das System bietet umfassende Funktionalität für moderne Geschäftsanwendungen.",
{ languagePack: GERMAN_LANGUAGE_PACK }
);
console.log({
aiLikelihood: result.aiLikelihood, // 0.0-1.0 probability score
certainty: result.certainty, // Detection confidence
dominantPattern: result.dominantPattern, // Primary detection signal
executionTime: result.executionTime, // Performance metrics
});
Cortex organizes intelligence into four specialized modules:
Each module can be imported individually for tree-shaking optimization:
import { NeuralNetwork } from "@raven-js/cortex/learning";
import { isAIText } from "@raven-js/cortex/language";
import { Matrix } from "@raven-js/cortex/structures";
import { calculateEasterSunday } from "@raven-js/cortex/temporal";
import { Chat } from "@raven-js/cortex/relay";
Ravens process information through distributed neural networks, sharing learning across the murder. Cortex mirrors this collective intelligence—adaptive algorithms that strengthen through usage, not coupling to external frameworks.
If you find RavenJS helpful, consider supporting its development:
Your sponsorship helps keep RavenJS zero-dependency, modern, and developer-friendly.
Built with ❤️ by Anonyfox
FAQs
Zero-dependency machine learning, AI, and data processing library for modern JavaScript
The npm package @raven-js/cortex receives a total of 58 weekly downloads. As such, @raven-js/cortex popularity was classified as not popular.
We found that @raven-js/cortex 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.