FLUTTER ECOSYSTEM

close2/mod97

根據 ISO7064 規範計算傳入數字的 MOD 97 10。

mod97 專案封面
Stars
0
Forks
1
最近推送(UTC)
2021年3月9日
專案狀態
未封存
Christian Loitsch GitHub avatar
GITHUB User

Christian Loitsch ↗

Austria
語言Dart

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 1 項
  • test開發依賴>1.16.0 <2.0.0

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 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

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.