T-38: M1.1b — Pass 2 normalization: ISIN/CUSIP validators, ticker root/suffix parser, IB fields in provider-symbol.ts

This commit is contained in:
Studio 2026-11-27 14:44:06 -05:00
parent 5483f7f127
commit eb8e2aa57a
4 changed files with 27 additions and 18 deletions

View file

@ -73,10 +73,8 @@ export function parseTicker(
const tickerRoot = s.slice(0, firstSep);
let pos = firstSep + 1;
if (isWhitespace(s.charCodeAt(firstSep))) {
while (pos < s.length && isWhitespace(s.charCodeAt(pos))) {
pos++;
}
while (pos < s.length && isWhitespace(s.charCodeAt(pos))) {
pos++;
}
if (pos >= s.length || isSeparator(s.charCodeAt(pos))) {
return null;
@ -90,12 +88,9 @@ export function parseTicker(
let classSuffix = s.slice(pos, secondSep);
pos = secondSep;
while (pos < s.length) {
const sepCode = s.charCodeAt(pos);
pos++;
if (isWhitespace(sepCode)) {
while (pos < s.length && isWhitespace(s.charCodeAt(pos))) {
pos++;
}
while (pos < s.length && isWhitespace(s.charCodeAt(pos))) {
pos++;
}
if (pos >= s.length || isSeparator(s.charCodeAt(pos))) {
return null;