Skip to content

Commit

Permalink
fix: remove invalidListGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
klawdyo committed Sep 11, 2024
1 parent 77c5ea5 commit f2126eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
27 changes: 0 additions & 27 deletions src/utils-invalidListGenerator.test.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 12,6 @@ export function sumToDV(sum: number): number {
return sum % 11 < 2 ? 0 : 11 - (sum % 11)
}

/**
* Cria uma lista de valores repetidos no tamanho do documento para eliminar
* valores que já conhecemos como inválidos
*
* @example
* invalidListGenerator(10, 11)
* //-> [00000000000, 11111111111, ....., 99999999999]
*
* @param {Integer} length Número de itens do array
* @param {Integer} size Tamanho da string gerada
* @returns {Array} Lista de valores
*/
export function invalidListGenerator(size: number): string[] {
return [...Array(10).keys()].map((f) => String(f).repeat(size))
}

/**
* Checa se o número repassado possui todos os digitos iguais
*
Expand Down

0 comments on commit f2126eb

Please sign in to comment.