Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlatformTools

Platform-specific tools.

Hierarchy

  • PlatformTools

Index

Properties

Static type

type: "browser" | "node" = "node"

Type of the currently running platform.

Methods

Static appendFileSync

  • appendFileSync(filename: string, data: any): void

Static fileExist

  • fileExist(pathStr: string): boolean

Static getEnvVariable

  • getEnvVariable(name: string): any

Static getGlobalVariable

  • getGlobalVariable(): any

Static highlightJson

  • highlightJson(json: string): any

Static highlightSql

  • highlightSql(sql: string): any

Static load

  • load(name: string): any
  • Loads ("require"-s) given file or package. This operation only supports on node platform

    Parameters

    • name: string

    Returns any

Static log

  • log(message: string): void

Static logError

  • logError(prefix: string, error: any): void

Static logInfo

  • logInfo(prefix: string, info: any): void

Static logWarn

  • logWarn(prefix: string, warning: any): void

Static pathExtname

  • pathExtname(pathStr: string): string

Static pathNormalize

  • pathNormalize(pathStr: string): string

Static pathResolve

  • pathResolve(pathStr: string): string

Static readFileSync

  • readFileSync(filename: string): Buffer

Static warn

  • warn(message: string): any

Static writeFile

  • writeFile(path: string, data: any): Promise<void>

Generated using TypeDoc