1// Pure (browser-free) English ordinal suffix, e.g. 1 -> "st", 21 -> "st", 2// 22 -> "nd", 23 -> "rd", 11/12/13 -> "th". Extracted so it can be unit-tested. 3export function ordinalSuffix(n) { 4 const a = Math.abs(Math.trunc(Number(n) || 0)); 5 const mod100 = a % 100; 6 if (mod100 >= 11 && mod100 <= 13) return 'th'; 7 switch (a % 10) { 8 case 1: return 'st'; 9 case 2: return 'nd'; 10 case 3: return 'rd'; 11 default: return 'th'; 12 } 13}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.