
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
Evaluates polynomials using Horner's rule.
Evaluate the polynomial 1 + 2 * x^2 at x = 2:
var horner = require("horner")
console.log(horner([1, 0, 2], 2.0))
9
Evaluate the polynomial 2 - 3i * x + (4 + 5i)*x^2 at x = 1+2i:
var horner = require("horner")
console.log(horner([[2, 0, 4] //Real coefficients
, [0, -3, 5]] //Imaginary coefficients
, [1, 2]))
[-24,-2]
Install using npm:
npm install horner
require("horner")(poly, z)Evaluates the polynomial at the point z
poly is the coefficients of the polynomial arranged in increasing degree. If complex, is a pair of arrays, the first representing the real coefficients and the second representing the imaginary coefficients.z is the point to evaluate the polynomial at. Either a scalar for a real valued function or a pair for a complex number.Returns: A scalar for real results, a pair for complex results
Time Complexity: O(poly.length)
(c) 2013 Mikola Lysenko. MIT License
FAQs
Evaluates polynomial
We found that horner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.