
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Helpful utility functions for basic statistical operations 😀

Made in 🇧🇩(Bangladesh) with 💖"
To use these utility functions in your project, you can install them via npm:
npm install ts-stats
or
yarn add ts-stats
Here's an overview of the available utility functions and how to use them:
import { avg } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const average = avg(numbers);
console.log("Average:", average);
import { corelation } from "ts-stats";
const dataX = [1, 2, 3, 4, 5];
const dataY = [2, 4, 6, 8, 10];
const correlation = corelation(dataX, dataY);
console.log("Correlation:", correlation);
import { extrema } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const [min, max] = extrema(numbers);
console.log("Min:", min, "Max:", max);
import { harmonicMean } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const mean = harmonicMean(numbers);
console.log("Harmonic Mean:", mean);
import { median } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const medianValue = median(numbers);
console.log("Median:", medianValue);
import { mode } from "ts-stats";
const numbers = [1, 2, 2, 3, 4, 4, 4, 5];
const modeValue = mode(numbers);
console.log("Mode:", modeValue);
import { percentile } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const p90 = percentile(numbers, 90);
console.log("90th Percentile:", p90);
import { range } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const rangeValue = range(numbers);
console.log("Range:", rangeValue);
import { stdDev } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const deviation = stdDev(numbers);
console.log("Standard Deviation:", deviation);
import { variance } from "ts-stats";
const numbers = [1, 2, 3, 4, 5];
const varianceValue = variance(numbers);
console.log("Variance:", varianceValue);
This project is licensed under the GPL License - see the LICENSE file for details.
FAQs
Helpful utility functions for basic statistical operations
We found that ts-stats 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.