π First Production Release
This marks the first production-ready release of rollout-bucket - a deterministic bucketing library for feature flags and A/B testing.
β¨ Features
- Deterministic bucketing using MurmurHash3 for consistent user assignment
- Feature isolation - different features produce independent distributions
- Multi-variant testing with TypeScript generics support
- Statistically validated uniform distribution (chi-square tested)
- Zero runtime dependencies (only murmur-hash)
- Dual module support (ESM + CommonJS)
- 100% test coverage with comprehensive edge case handling
- TypeScript-first with bundled type definitions
π¦ API
import { RolloutBucket } from 'rollout-bucket';
const rollout = new RolloutBucket();
// Percentage-based feature flags
if (rollout.isEnabled('new-ui', userId, 25)) {
// Enabled for 25% of users
}
// A/B testing
const variant = rollout.getVariant('checkout-flow', userId, [
{ name: 'control', weight: 50 },
{ name: 'variant-a', weight: 30 },
{ name: 'variant-b', weight: 20 },
]);π Performance
- Hash computation: ~50-100ns per call
- Bundle size: < 5KB minified
- Memory: Stateless (zero allocation)
π§ Installation
npm install rollout-bucketπ Documentation
β Quality Metrics
- Test Coverage: 100% statements, 90.9% branches
- CI Status: Passing on Node.js 18.x, 20.x, 22.x
- Security: No vulnerabilities
- Code Quality: Grade A
π Credits
Built with β€οΈ by @vnykmshr
Full Changelog: https://github.com/vnykmshr/rollout-bucket/blob/main/docs/CHANGELOG.md