Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@santi100a/quadratic-function
Advanced tools
Santi's Quadratic Function Toolkit: A simple library for common tasks regarding quadratic functions.
This is a small library that allows you to calculate things like the vertex or roots of a quadratic function. Quadratic equations can be solved using the latter.
npm install @santi100a/quadratic-function
yarn add @santi100a/quadratic-function
pnpm install @santi100a/quadratic-function
QuadraticFunction.vertex(): { x: number, y: number };
Returns an object containing the coordinates of the highest or lowest point the function will reach.QuadraticFunction.roots(): [number?, number?];
Calculates the real roots of the QuadraticFunction
.QuadraticFunction.evaluate(x: number): number;
Evaluates the QuadraticFunction
at x
.
Name | Type | Description | Optional? | Default |
---|---|---|---|---|
x | number | The value at which to evaluate the function. | Yes | N/A |
import QuadraticFunction = require('@santi100a/quadratic-function'); // TypeScript
const QuadraticFunction = require('@santi100a/quadratic-function'); // CommonJS
import QuadraticFunction from '@santi100a/quadratic-function'; // ESM
const fn = new QuadraticFunction(1, -1, -1);
fn.evaluate(12); // => 131
fn.evaluate(0); // => -1
fn.vertex(); // => { x: 0.5, y: -1.25 }
fn.roots(); // => [ (1 + sqrt(5)) / 2, (1 - sqrt(5)) / 2 ]
Wanna contribute? File an issue or pull request! Look at the contribution instructions and make sure you follow the contribution Code of Conduct.
FAQs
Santi's Quadratic Function Toolkit: A simple library for common tasks regarding quadratic functions.
The npm package @santi100a/quadratic-function receives a total of 1 weekly downloads. As such, @santi100a/quadratic-function popularity was classified as not popular.
We found that @santi100a/quadratic-function 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.