https://github.com/close2/mod97
Calculates the MOD 97 10 of the passed number as specified in ISO7064.
https://github.com/close2/mod97
dart
Last synced: about 1 month ago
JSON representation
Calculates the MOD 97 10 of the passed number as specified in ISO7064.
- Host: GitHub
- URL: https://github.com/close2/mod97
- Owner: close2
- License: mit
- Created: 2017-02-13T18:58:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-09T19:02:40.000Z (about 5 years ago)
- Last Synced: 2023-08-20T22:33:27.907Z (over 2 years ago)
- Topics: dart
- Language: Dart
- Size: 330 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/arhs/iban.js)

## 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 `int`eger.
Invalid characters throw a `FormatException` unless an `onError`
function is provided.