{"id":26699686,"url":"https://github.com/santi100a/quadratic-function","last_synced_at":"2026-05-05T05:40:18.053Z","repository":{"id":217542148,"uuid":"744214117","full_name":"santi100a/quadratic-function","owner":"santi100a","description":"Santi's Quadratic Function Toolkit: A simple library for common tasks regarding quadratic functions.","archived":false,"fork":false,"pushed_at":"2024-02-26T19:44:50.000Z","size":416,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T09:03:16.039Z","etag":null,"topics":["es3","math","npm","quadratic-equations","quadratic-functions","typescript-library"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@santi100a/quadratic-function","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santi100a.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"santi100a"}},"created_at":"2024-01-16T21:00:24.000Z","updated_at":"2024-01-16T22:23:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c15d29f-3449-4b82-b844-4e179a7cb794","html_url":"https://github.com/santi100a/quadratic-function","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.33333333333333337","last_synced_commit":"a176eb60fa98501abe83c0ee08858f5bff3f0a77"},"previous_names":["santi100a/quadratic-function"],"tags_count":3,"template":false,"template_full_name":"santi100a/npm-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santi100a%2Fquadratic-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santi100a%2Fquadratic-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santi100a%2Fquadratic-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santi100a%2Fquadratic-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santi100a","download_url":"https://codeload.github.com/santi100a/quadratic-function/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240916,"owners_count":20583101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es3","math","npm","quadratic-equations","quadratic-functions","typescript-library"],"created_at":"2025-03-26T23:16:15.596Z","updated_at":"2026-05-05T05:40:18.000Z","avatar_url":"https://github.com/santi100a.png","language":"JavaScript","funding_links":["https://github.com/sponsors/santi100a"],"categories":[],"sub_categories":[],"readme":"# Santi's Quadratic Function Toolkit\r\n\r\n[![Build Status][workflow badge]][repo actions]\r\n[![npm homepage][npm badge]][npm home]\r\n[![GitHub stars][stars badge]][repo url]\r\n[![License][license badge]][repo url]\r\n[![Bundlephobia stats][bundlephobia badge]][bundlephobia url]\r\n\r\n[workflow badge]: https://github.com/santi100a/quadratic-function/actions/workflows/ci.yml/badge.svg\r\n[npm badge]: https://img.shields.io/npm/v/@santi100a/quadratic-function\r\n[stars badge]: https://img.shields.io/github/stars/santi100a/quadratic-function.svg\r\n[license badge]: https://img.shields.io/github/license/santi100a/quadratic-function.svg\r\n[bundlephobia badge]: https://img.shields.io/bundlephobia/min/@santi100a/quadratic-function\r\n\r\n[npm home]: https://npmjs.org/package/@santi100a/quadratic-function\r\n[repo actions]: https://github.com/santi100a/quadratic-function/actions\r\n[repo url]: https://github.com/santi100a/quadratic-function\r\n[bundlephobia url]: https://bundlephobia.com/package/@santi100a/quadratic-function@latest\r\n\r\n- 🚀 Lightweight and fast\r\n- 👴 ES3-compliant\r\n- 💻 Portable between the browser and Node.js\r\n\r\n\r\n## What's this?\r\n\r\nThis is a small library that allows you to calculate things like the vertex or roots of a\r\nquadratic function. Quadratic equations can be solved using the latter.\r\n\r\n## Installation\r\n\r\n- Via NPM: `npm install @santi100a/quadratic-function`\r\n- Via Yarn: `yarn add @santi100a/quadratic-function`\r\n- Via PNPM: `pnpm install @santi100a/quadratic-function`\r\n\r\n## API\r\n- `QuadraticFunction.vertex(): { x: number, y: number };` Returns an object containing the coordinates of the highest or lowest point the function will reach.\r\n- `QuadraticFunction.roots(): [number?, number?];` Calculates the real roots of the `QuadraticFunction`.\r\n- `QuadraticFunction.evaluate(x: number): number;` Evaluates the `QuadraticFunction` at `x`.\r\n   | Name       |     Type    | Description        | Optional? | Default                                |\r\n   |------------|-------------|--------------------|-----------|----------------------------------------|\r\n   |`x`|`number`|The value at which to evaluate the function.|Yes | _N/A_|\r\n\r\n## Usage\r\n\r\n```typescript\r\nimport QuadraticFunction = require('@santi100a/quadratic-function'); // TypeScript\r\nconst QuadraticFunction = require('@santi100a/quadratic-function'); // CommonJS\r\nimport QuadraticFunction from '@santi100a/quadratic-function'; // ESM\r\n\r\nconst fn = new QuadraticFunction(1, -1, -1);\r\nfn.evaluate(12); // =\u003e 131\r\nfn.evaluate(0); // =\u003e -1\r\nfn.vertex(); // =\u003e { x: 0.5, y: -1.25 }\r\nfn.roots(); // =\u003e [ (1 + sqrt(5)) / 2, (1 - sqrt(5)) / 2 ]\r\n```\r\n## Contribute\r\n\r\nWanna contribute? [File an issue](https://github.com/santi100a/quadratic-function/issues) or [pull request](https://github.com/santi100a/quadratic-function/pulls)! \r\nLook at [the contribution instructions](CONTRIBUTING.md) and make sure you follow the [contribution Code of Conduct](CODE_OF_CONDUCT.md).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanti100a%2Fquadratic-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanti100a%2Fquadratic-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanti100a%2Fquadratic-function/lists"}