Skip to content

Commit

Permalink
chore: substrings of length one (#2496)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Oct 23, 2023
1 parent 2ba232e commit bd19703
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/apidoc/typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function extractModuleName(module: DeclarationReflection): string {

export function extractModuleFieldName(module: DeclarationReflection): string {
const moduleName = extractModuleName(module);
return moduleName.substring(0, 1).toLowerCase() + moduleName.substring(1);
return moduleName[0].toLowerCase() + moduleName.substring(1);
}

export const MISSING_DESCRIPTION = 'Missing';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/helpers/luhn-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function luhnChecksum(str: string): number {
let sum = 0;
let alternate = false;
for (let i = str.length - 1; i >= 0; i--) {
let n = Number.parseInt(str.substring(i, i + 1));
let n = Number.parseInt(str[i]);
if (alternate) {
n *= 2;
if (n > 9) {
Expand Down

0 comments on commit bd19703

Please sign in to comment.