gematria method

Object gematria(
  1. Object number, {
  2. int? limit,
  3. bool? order,
  4. bool? geresh,
  5. bool? punctuate,
})

Implementation

Object gematria(
  Object number, {
  int? limit,
  bool? order,
  bool? geresh,
  bool? punctuate,
}) {
  final numberType = number.runtimeType;

  if (numberType == int || numberType == String) {
    final opts = [this.limit, this.order, this.geresh, this.punctuate];

    this.limit = limit ?? this.limit;
    this.order = order ?? this.order;
    this.geresh = geresh ?? this.geresh;
    this.punctuate = punctuate ?? this.punctuate;

    _parts = number.toString().split('').reversed.toList();

    switch (numberType) {
      case int:
        return _fromInt(() => _resetOptions(opts));
      case String:
        return _fromString(() => _resetOptions(opts));
    }
  }
  return '';
}