
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
equation-balancer
Advanced tools
A very simple CLI chemical equation balancer
npm install -g equation-balancer
Requires Node 8.
Call equation-solver with no arguments to get a loop that prompts for an equation:
balance > Fe + H2SO4 -> Fe2(SO4)3 + H2
2, 3, 1, 3
or call equation-solver with a single argument of the equation you want balanced in quotes.
equation-balancer "Fe + H2SO4 -> Fe2(SO4)3 + H2"
2, 3, 1, 3
Separate terms with + and use -> to separate the reactants from the products. Capitalization matters.
You can also use the function programmatically,
const balance = require('equation-balancer/balance');
balance('Fe + H2SO4 -> Fe2(SO4)3 + H2') // [2, 3, 1, 3]
It parses the input into a set of terms and places them into a matrix.
For example, the equation
Fe + H2SO4 -> Fe2(SO4)3 + H2
Gets parsed into:
const matrix = [
[ 1, 0, -2, 0 ], // Fe
[ 0, 4, -12, 0 ], // O
[ 0, 2, 0, -2 ], // H
[ 0, 1, -3, 0 ], // S
];
And then that gets row reduced into:
const reduceMatrix = [
[ 1, 0, 0, -0.6666666666666666 ],
[ 0, 1, 0, -1 ],
[ 0, 0, 1, -0.3333333333333333 ],
[ 0, 0, 0, 0 ]
];
The last column of rows in the matrix get converted to fractions and then the LCM is applied to give the final result:
2, 3, 1, 3
FAQs
> A very simple CLI chemical equation balancer
The npm package equation-balancer receives a total of 0 weekly downloads. As such, equation-balancer popularity was classified as not popular.
We found that equation-balancer demonstrated a not healthy version release cadence and project activity because the last version was released 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.