Function
Static Public Summary | ||
public |
checkVersion(version: String, minVersion: String, maxVersion: String) Checks if a version is within the provided range. |
|
public |
Returns true if the specified value is an object (i.e. |
|
public |
Generates a decorator function ensuring an operation is not performed from within a batch request. |
|
public |
Transforms an object into an URL query string, stripping out any undefined values. |
|
public |
Generates a decorator function ensuring a version check is performed against the provided requirements before executing it. |
Static Public
public checkVersion(version: String, minVersion: String, maxVersion: String) source
import {checkVersion} from 'kinto-client/lib/utils.js'
Checks if a version is within the provided range.
Throw:
If the version is outside of the provided range. |
public isObject(thing: Object): bool source
import {isObject} from 'kinto-client/lib/utils.js'
Returns true if the specified value is an object (i.e. not an array nor null).
Params:
Name | Type | Attribute | Description |
thing | Object | The value to inspect. |
Return:
bool |
public nobatch(message: String): Function source
import {nobatch} from 'kinto-client/lib/utils.js'
Generates a decorator function ensuring an operation is not performed from within a batch request.
Params:
Name | Type | Attribute | Description |
message | String | The error message to throw. |
public qsify(obj: Object): String source
import {qsify} from 'kinto-client/lib/utils.js'
Transforms an object into an URL query string, stripping out any undefined values.
Params:
Name | Type | Attribute | Description |
obj | Object |
Test:
public support(min: String, max: String): Function source
import {support} from 'kinto-client/lib/utils.js'
Generates a decorator function ensuring a version check is performed against the provided requirements before executing it.