just-skewness
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

just-skewness

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-skewness
yarn add just-skewness

Return the skewness of an array or numeric argument list using Pearson's second skewness coefficient

import skewness from "just-skewness";

// Using Pearson's second skewness coefficient
skewness(3, 2, 1); // 0
skewness([1, 2, 3, 2, 4, 1]); // 0.4276994613841504
skewness(1, 2, 3, 4, 5, -6); // -0.762000762001143
skewness([1, 2, 3, 4, 9]); // 0.7705935588815224
skewness([4]); // throws
skewness(["3", 2]); // throws
skewness(NaN, NaN); // throws
skewness(); // throws

Package Sidebar

Install

npm i just-skewness

Weekly Downloads

0

Version

2.2.0

License

MIT

Unpacked Size

6.03 kB

Total Files

9

Last publish

Collaborators

  • angus-c