ABBA.js is a JavaScript library designed for statistical analysis relevant to A/B testing, including functions for normal and binomial distributions, and a utility for computing experiment results. It provides methods for density, cumulative distribution function (CDF), survival function, and inverse CDF for both normal and binomial distributions. Additionally, it offers an `Experiment` class to calculate proportion, relative improvement, and p-value for A/B test variations against a baseline. The package is currently at version 0.1.4, published in 2014, and appears to be abandoned, with no significant updates or active maintenance in over 7 years. Its core differentiator lies in offering common statistical distribution functions and A/B test result computation directly in JavaScript, without external dependencies, though its age makes it unsuitable for modern ESM-first environments.
npm install abbajsVerified import paths — ran on the pinned version, not inferred.
Demonstrates the core functionality of Abba.js, including creating and using Normal and Binomial distribution objects, and computing A/B experiment results.
For Node.js ESM projects, dynamic `import()` might be used with caution, but is not officially supported. For browser ESM, a CJS-compatible bundler (like Webpack or Rollup) is required. In Node.js CJS, use `const Abba = require('abbajs');`.Evaluate alternatives for A/B testing analysis that are actively maintained and compatible with modern JavaScript ecosystems. If used, thoroughly audit the code for potential vulnerabilities or inaccuracies.
Replace `var` with `const` or `let` as appropriate in your consuming code, though this does not change the internal implementation of the library.
Ensure your file is treated as CommonJS (e.g., `.js` in a `package.json` with `"type": "commonjs"` or without a `"type"` field, or directly running with `node --require esm-loader your-file.js`) or use a bundler for browser usage. If you must use ESM, consider dynamic `import('abbajs')` (though not officially supported by this library).Always use the `new` keyword when creating instances of distribution or experiment classes, e.g., `const normal = new Abba.NormalDistribution(1, 2);`
Verify that `require('abbajs')` successfully returns the `Abba` object and that `abbajs` is correctly installed. Ensure the module is loaded in a CommonJS context.No dependency data recorded yet.