Skip to content

Commit

Permalink
comment and reference
Browse files Browse the repository at this point in the history
  • Loading branch information
bmacnaughton committed Mar 21, 2021
1 parent 0891e68 commit c31da98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/isISIN.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import assertString from './util/assertString';

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

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

export default function isISIN(str) {
assertString(str);
Expand Down

0 comments on commit c31da98

Please sign in to comment.