Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace util

Index

Functions

  • fixEol(path: string): string
  • fwdSlashes(path: string): string
  • substitute a forward slash for all backslashes

    Parameters

    • path: string

    Returns string

  • genId(): string
  • header(headers: {}, name: string): [string, string] | undefined
  • Parameters

    • headers: {}
      • [key: string]: string
    • name: string

    Returns [string, string] | undefined

  • isJson(str: string): boolean
  • lineComment(line: string, token?: string): string | undefined
  • Return the trailing comment portion of a line. Only works with no embedded comment tokens (in string content, etc).

    Parameters

    • line: string
    • token: string = '#'

    Returns string | undefined

  • lines(input: string): string[]
  • split a string into an array of lines, ignoring escaped

    Parameters

    • input: string

    Returns string[]

  • nanoTime(): number
  • newlines(input: string): string
  • Remove windows newline characters (\r)

    Parameters

    • input: string

    Returns string

  • plyVersion(): Promise<string>
  • rmdirs(dir: string): Promise<void>
  • timeparse(time: string): Date | undefined
  • Expected format is per timestamp() -- TODO: Only works for these two locale formats: MM/DD/YYYY, HH:mm:ss DD/MM/YYYY, HH:mm:ss (not tested actually)

    Parameters

    • time: string

    Returns Date | undefined

  • timestamp(date: Date, withTimeZone?: boolean, withMillis?: boolean): string
  • writeableFileName(file: string): string
  • writeableName(name: string): string
  • writeablePath(path: string): string

Generated using TypeDoc