Skip to content
Calculates the MOD 97 10 of the passed number as specified in ISO7064.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
lib
test
tool
.analysis_options
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
pubspec.yaml

README.md

mod97

Calculates the MOD 97 10 of the passed number as specified in ISO7064.

Only positive numbers are allowed.

I have copied this code from iban.js

Build Status

Usage

A simple usage example:

import 'package:mod97/mod97.dart';

main() {
  int m = mod97('1234567');
  
  int m2 = mod97('-123', onError: (_) => 5);
  // m2 will be 5
}

The input must be a String. Returned value is an integer.

Invalid characters throw a FormatException unless an onError function is provided.

You can’t perform that action at this time.