-
-
Notifications
You must be signed in to change notification settings - Fork 44
utils.js
-
isProcessEnv() ⇒
boolean -
Similar to
isStandardBrowserEnv, just check it's running in a Node environment -
isProcessFormData(val) ⇒
boolean -
Determine if a value is a
form-datanode module -
userAgent() ⇒
string -
Compose the
User-Agentcontent -
implicityReturnValues(message, response) ⇒
AssertionError -
Customize an
AssertionErrorwith the originaldata, minimum implementated theAxiosResponsestucture.Note here: It's not a good idea that thrown the
AssertionErrorfromaxios.transformDataforEachstack. The fulfilledAxiosResponseis{ status, statusText, headers, config, request }, here can only touched thedataandheaders, postpone onto next major version to re-design.
Similar to isStandardBrowserEnv, just check it's running in a Node environment
Kind: global function
Returns: boolean - Ture on Node, otherwise false
Determine if a value is a form-data node module
Kind: global function
Returns: boolean - True if value is a form-data module, otherwise false
See
| Param | Type | Description |
|---|---|---|
| val | Object |
To test value |
Compose the User-Agent content
Kind: global function
Returns: string - - The User-Agent value
Customize an AssertionError with the original data, minimum implementated the AxiosResponse stucture.
Note here: It's not a good idea that thrown the AssertionError from axios.transformData forEach stack.
The fulfilled AxiosResponse is { status, statusText, headers, config, request },
here can only touched the data and headers, postpone onto next major version to re-design.
Kind: global function
Returns: AssertionError - - The customized AssertionError
| Param | Type | Description |
|---|---|---|
| message | string |
The message |
| response |
string | object | any
|
the response |
| ...params |
Array.<string> | Array.<int>
|
the params |