starfruit
2.0.0, released 5 years ago by kishoredev.live
Mathematical, collection, and statistical utility library for Dart extending dart:math.
What it does
Extends Dart SDK and dart:math functions with additional mathematical calculations, collection operations, and statistical analysis methods. It provides singletons and extensions for lists and maps to simplify math, statistics, and data processing.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need helper functions like factorials, primes, LCM, or base logarithms in Dart.
- You want easy statistical measures (mean, median, mode, standard deviation) on lists of numbers.
- You need regression analysis (linear, quadratic, cubic, quartic) on paired numerical data.
Skip it when
- You need complex matrix operations that require specialized linear algebra packages.
- You require async-heavy collection utilities.
Strengths
- Comprehensive set of math and statistical extensions for lists and maps.
- Includes advanced utilities like regressions and combinations.
- Null safe.
Weaknesses
- Limited documentation beyond basic code examples and auto-generated dartdocs.
- Relies on singletons and extensions which might not fit all architectural preferences.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:starfruit/starfruit.dart';
main() {
print(mathUtils.roundToDouble(3.5634, 2));
print(mathUtils.isPowerOfTwo(8));
print(mathUtils.factorial(5));
}Alternatives
Packages that do the same job and could replace starfruit.
- strings
Large collection of String functions extending the String class and supporting nullable Strings safely.
83Compare - statistics
Statistics package for data manipulation, mathematical functions, and Bayesian Networks.
64Compare - matrix2d
Mathematical 2D array functions and manipulations inspired by NumPy
50Compare
Works with
Packages commonly used together with starfruit: ones it builds on, ones built on it, and its own family.