-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.0.1: Update Typescript definitions
- Loading branch information
Showing
8 changed files
with
331 additions
and
305 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Añade el siguiente script a tu proyecto: | |
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/validate-rfc@latest/dist/index.js" type="text/javascript"></script> | ||
|
||
<!-- O especifica una versión --> | ||
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/[email protected].0/dist/index.js" type="text/javascript"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/[email protected].1/dist/index.js" type="text/javascript"></script> | ||
|
||
<!-- Esto va a exportar una función "validateRfc": --> | ||
<script type="text/javascript"> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default function validateRfc(rfc: string, options?: { strict?: boolean }): { | ||
export default function validateRfc<T extends string>(rfc: T, options?: { omitVerificationDigit?: boolean }): { | ||
isValid: boolean, | ||
type?: 'company' | 'person' | 'foreign' | 'generic', | ||
rfc?: string, | ||
rfc?: T, | ||
errors?: ('INVALID_FORMAT' | 'INVALID_DATE' | 'INVALID_VERIFICATION_DIGIT' | 'FORBIDDEN_WORD')[] | ||
}; |
Oops, something went wrong.