gematria 1.0.0+1 copy "gematria: ^1.0.0+1" to clipboard
gematria: ^1.0.0+1 copied to clipboard

Converts a numerical value to a string of Hebrew letters.

Gematria #

pub package

Dart module for converting a numeric value to a string of Hebrew letters and vice versa. This module is inspired by this package.

Installation #

First, add gematria as a dependency in your pubspec.yaml file.

dependencies:
  gematria: ^1.0.0

Import #

import 'package:gematria/gematria.dart';

Synopsis #

main() {
  final gm = Gematria(
    limit: 0,        // default
    order: false,    // default
    geresh: true,    // default
    punctuate: true, // default
  );

  final output = [
    gm.gematria(5774), // התשע״ד - ordinary
    gm.gematria(5774, limit: 3), // תשע״ד - cropped to 774
    gm.gematria(5774, limit: 7), // התשע״ד - kept at 5774
    gm.gematria(5774, punctuate: false), // 'התשעד' - removed quotation marks
    gm.gematria(5774, punctuate: true), // 'התשע״ד' - with quotation marks
    gm.gematria(5774, geresh: false), // 'התשע"ד' - with quotation marks
    gm.gematria(5774, punctuate: false, limit: 3), // 'תשעד' - options can be combined
    gm.gematria(3), // 'ג׳' - with the geresh
    gm.gematria(3, geresh: false), // - "ג'" - with the apostrophe
    gm.gematria('התשעד', order: true), // 5774 - treats the characters as an ordered number
    gm.gematria('התשעד', order: false), // 779 - Adds up all the characters
  ];

  print(output);
}
1
likes
120
pub points
28%
popularity

Publisher

unverified uploader

Converts a numerical value to a string of Hebrew letters.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on gematria