Constructors

Properties

JOLLY_CHAR: string = "*"
OMOCODE_BITMAP: number = 0b0111011011000000

Default omocode bitmap

belfioreConnector: IBelfioreConnector

Methods

  • Parameters

    • targetChar: string
    • counterCaseChar: string

    Returns string

  • Parameters

    • fiscalCode: string

      16 character Codice Fiscale to decode

    Returns Promise<default>

    Decoded CF Info

  • Convert omocode CF into plain one

    Parameters

    • codiceFiscale: string

      Partial or complete Omocode/Regular CF to parse, starting from LastName

    Returns string

    Regular CF w/o omocodes chars

  • Parse birth date information

    Parameters

    • codiceFiscale: string

      Partial or complete CF to parse

    Returns null | Date

    Birth Date

  • Parse birth place information

    Parameters

    • codiceFiscale: string

      Partial or complete CF to parse

    • checkBirthDateConsistency: boolean = true

      Ensure birthday is between creation and expiran date of the cf city or country, default value: true

    Returns Promise<null | BelfiorePlace>

    Birth place

  • Parse birth year information

    Parameters

    • codiceFiscale: string

      Partial or complete CF to parse

    Returns null | number

    Birth Year (4 digits)

  • Parse firstName information

    Parameters

    • codiceFiscale: string

      Partial or complete CF to parse

    Returns null | string

    Partial/possible firstName

  • Parse lastName information

    Parameters

    • codiceFiscale: string

      Partial or complete CF to parse

    Returns null | string

    Partial/possible lastName

  • Parse Date and Gender information to create Date/Gender CF part

    Parameters

    • date: MultiFormatDate

      Date instance, ISO8601 date string or array of numbers [year, month, day]

    • gender: Genders

      Gender enum value

    Returns null | string

    Birth date and Gender CF code

  • Parse day information

    Parameters

    • day: number

      Day number 1..31

    • gender: Genders

      Gender enum value

    Returns null | string

    Birth Day CF code

  • Generates full CF

    Parameters

    • __namedParameters: Omit<default, "place"> & {
          place?: string | BelfiorePlace;
      }

    Returns Promise<null | string>

    Complete CF

  • Parse firstName to cf part

    Parameters

    • Optional firstName: null | string

      Partial or complete CF to parse

    Returns null | string

    partial cf

  • Parse lastName to cf part

    Parameters

    • Optional lastName: null | string

      Partial or complete CF to parse

    Returns null | string

    partial cf

  • Parse month information

    Parameters

    • month: number

      Month number 0..11

    Returns null | string

    Birth Month CF code

  • Convert omocode full or chunk CF into plain one

    Parameters

    • partialCodiceFiscale: string

      Partial or complete Omocode/Regular CF to parse

    • offset: number = 0

      starting point of the given chunk in the 16 char CF

    Returns string

    Regular version w/o omocodes chars of the given chunk

  • Parse a Date and Gender information to create Date/Gender CF part

    Parameters

    • cityOrCountryName: string

      City or Country name

    • Optional provinceId: string

      Province code for cities

    Returns Promise<null | string>

    Matching place belfiore code, if only once is matching criteria

  • Parameters

    • birthDate: MultiFormatDate
    • cityOrCountryName: string
    • Optional provinceId: string

    Returns Promise<null | string>

  • Parse Year, Month, Day to Dated

    Parameters

    • year: undefined | null | number

      4 digits Year

    • month: undefined | null | DateMonth = 0

      1 or 2 digits Month 0..11

    • day: undefined | null | DateDay = 1

      1,2 digits Day 1..31

    Returns null | Date

    Date or null if provided year/month/day are not valid

  • Parse year to cf part

    Parameters

    • year: string | number

      Birth year 2 or 4 digit string, number above 19XX or below 100

    Returns null | string

    partial cf