Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const expectedOutputOrder

expectedOutputOrder: string[] = ...

The expected ordering of the keys for the User model when writing the model to a file

Const outputFilePath

outputFilePath: "./actual_output.txt" = './actual_output.txt'

the output path that is written to by the application

Functions

userArrayOfArraysToExpectedString

  • userArrayOfArraysToExpectedString(usersArr: User[][]): string
  • returns a User[][] in the expected string format that would be then written to a file.

    Parameters

    • usersArr: User[][]

      the user[][]

    Returns string

userArrayOfArraysToFileOutput

  • userArrayOfArraysToFileOutput(usersArr: User[][], filePath?: string): Promise<void>
  • The only function that is to be used outside of testing. When creating npm modules, this is enforced by re-exporting only specific functions which are relevant to the user of the package.

    This take a User[][] and writes it to an output file in the expected format.

    Parameters

    • usersArr: User[][]

      the Output groups to write to the file

    • filePath: string = ...

      the file path to be written to, defaults to the common path used

    Returns Promise<void>

userArrayToString

  • userArrayToString(users: User[]): string
  • Takes a single user model and converts it into a string

    Parameters

    • users: User[]

      the user array to turn into a string

    Returns string

userToString

  • userToString(user: User): string
  • Turns a single user model into a space delimited string

    Parameters

    • user: User

      the user model to convert

    Returns string

writeStringToFile

  • writeStringToFile(stringToWrite: string, filePath: string): Promise<void>
  • Write a single string to a file, over-writes any existing file with the same path.

    Parameters

    • stringToWrite: string

      string to write to file

    • filePath: string

      file path to write to.

    Returns Promise<void>

    Promise

Generated using TypeDoc