AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

### Hierarchy

- JS

## Index

### Methods

- browserOrNode
- filenameToContentType
- generateRandomString
- isEmpty
- isStrictObject
- isTextFile
- makeQuerablePromise
- objectLessAttributes
- sortByField
- transferKeyToLowerCase
- transferKeyToUpperCase

## Methods

### Static browserOrNode

- browserOrNode(): object

- - Defined in core/src/JS.ts:151

  #### Returns object

  - ##### isBrowser: boolean

  - ##### isNode: boolean

### Static filenameToContentType

- filenameToContentType(filename: any, defVal?: string): string

- - Defined in core/src/JS.ts:97

  #### Parameters

  - ##### filename: any

  - ##### Default value defVal: string = "application/octet-stream"

  #### Returns string

### Static generateRandomString

- generateRandomString(): string

- - Defined in core/src/JS.ts:115

  generate random string

  #### Returns string

### Static isEmpty

- isEmpty(obj: any): boolean

- - Defined in core/src/JS.ts:53

  #### Parameters

  - ##### obj: any

  #### Returns boolean

### Static isStrictObject

- isStrictObject(obj: any): boolean

- - Defined in core/src/JS.ts:227

  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

- - Defined in core/src/JS.ts:104

  #### Parameters

  - ##### contentType: any

  #### Returns boolean

### Static makeQuerablePromise

- makeQuerablePromise(promise: any): any

- - Defined in core/src/JS.ts:124

  #### Parameters

  - ##### promise: any

  #### Returns any

### Static objectLessAttributes

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

- - Defined in core/src/JS.ts:82

  #### Parameters

  - ##### obj: any

  - ##### less: any

  #### Returns any

### Static sortByField

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

- - Defined in core/src/JS.ts:57

  #### Parameters

  - ##### list: any

  - ##### field: any

  - ##### dir: any

  #### Returns boolean

### Static transferKeyToLowerCase

- transferKeyToLowerCase(obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]): any

- - Defined in core/src/JS.ts:170

  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

- - Defined in core/src/JS.ts:199

  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