Skip to content

Commit c31da98

Browse files
committed
comment and reference
1 parent 0891e68 commit c31da98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/isISIN.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import assertString from './util/assertString';
22

33
const isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;
44

5+
// this link details how the check digit is calculated:
6+
// https://www.isin.org/isin-format/. it is a little bit
7+
// odd in that it works with digits, not numbers. in order
8+
// to make only one pass through the ISIN characters, the
9+
// each alpha character is handled as 2 characters within
10+
// the loop.
511

612
export default function isISIN(str) {
713
assertString(str);

0 commit comments

Comments
 (0)