Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • JS

Index

Methods

Static browserOrNode

  • browserOrNode(): object

Static filenameToContentType

  • filenameToContentType(filename: any, defVal?: string): string
  • Parameters

    • filename: any
    • Default value defVal: string = "application/octet-stream"

    Returns string

Static generateRandomString

  • generateRandomString(): string

Static isEmpty

  • isEmpty(obj: any): boolean

Static isStrictObject

  • isStrictObject(obj: any): boolean
  • Return true if the object is a strict object which means it's not Array, Function, Number, String, Boolean or Null

    Parameters

    • obj: any

      the Object

    Returns boolean

Static isTextFile

  • isTextFile(contentType: any): boolean

Static makeQuerablePromise

  • makeQuerablePromise(promise: any): any

Static objectLessAttributes

  • objectLessAttributes(obj: any, less: any): any

Static sortByField

  • sortByField(list: any, field: any, dir: any): boolean

Static transferKeyToLowerCase

  • transferKeyToLowerCase(obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]): any
  • transfer the first letter of the keys to lowercase

    Parameters

    • obj: any

      the object need to be transferred

    • Default value whiteListForItself: any[] = []

      whitelist itself from being transferred

    • Default value whiteListForChildren: any[] = []

      whitelist its children keys from being transferred

    Returns any

Static transferKeyToUpperCase

  • transferKeyToUpperCase(obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]): any
  • transfer the first letter of the keys to lowercase

    Parameters

    • obj: any

      the object need to be transferred

    • Default value whiteListForItself: any[] = []

      whitelist itself from being transferred

    • Default value whiteListForChildren: any[] = []

      whitelist its children keys from being transferred

    Returns any