This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns true if valid, false if not. Note that registrationNumber param is a string (usually provided by HTML imput) | |
validateRegistrationNumber(registrationNumber: string): boolean { | |
if (registrationNumber.length !== 14) { | |
return false | |
} | |
let sum = 0 | |
let digit: number | |
for (let i = 0; i < registrationNumber.length; i++) { | |
if (i % 2 === 0) { | |
digit = parseInt(registrationNumber.charAt(i), 10) * 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$base-font-size: 16px; | |
$base-line-height: 1.5; | |
// this value may vary for each font | |
// unitless value relative to 1em | |
$cap-height: 0.68; | |
@mixin baseline($font-size, $scale: 2) { |