Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/nodejs-utils"

Index

Functions

checkNodeJsVersion

  • checkNodeJsVersion(): void
  • Returns void

clearRequireCache

  • clearRequireCache(resolvedModulePath: string): void
  • Clears 'require' cache for specified node module.

    Parameters

    • resolvedModulePath: string

    Returns void

getProcInfo

  • getProcInfo(): string
  • Returns string

getResourcesUsage

  • getResourcesUsage(isTestLog?: undefined | false | true): string
  • Parameters

    • Optional isTestLog: undefined | false | true

    Returns string

isPromise

  • isPromise(p: any): boolean
  • Parameters

    • p: any

    Returns boolean

requireArray

  • requireArray(modules: string[]): void
  • Parameters

    • modules: string[]

    Returns void

requireEx

  • requireEx(modPath: string, clearCache?: undefined | false | true): object
  • Wrapper for 'require'. Allows to clean cache.

    throws

    {*} - Exceptions from 'require' calls.

    Parameters

    • modPath: string

      path to module.

    • Optional clearCache: undefined | false | true

      Set to true if cache should be deleted immediately.

    Returns object

requireIfExists

  • requireIfExists(modPath: string): any
  • Wrapper for require, do not generate exception if path is absent.

    Parameters

    • modPath: string

      path to module.

    Returns any

    • exports from existing module or empty object if module is absent.