Methods
#
(static) commonParameters(parameters, config) → {Object}
Parameters:
Name |
Type |
Description |
parameters |
Object
|
|
config |
Object
|
Properties
Name |
Type |
Description |
editgroup |
string
|
|
summary |
string
|
|
|
#
(static) currentEntityId() → (nullable) {string}
Get the entity-ID of the entity that's currently open.
#
(static) entityIdFromClaimId(claimId) → {string}
Parameters:
Name |
Type |
Description |
claimId |
string
|
Wikidata claim-ID. |
Returns:
Wikidata Q-ID which the claimId belongs to.
-
Type
-
string
#
(async, static) filterAsync(array, callbackFn) → {Promise.<Array.<T>>}
Parameters:
Name |
Type |
Description |
array |
Array.<T>
|
|
callbackFn |
function
|
|
Returns:
-
Type
-
Promise.<Array.<T>>
Reverses the "direction" of a precision comparison.
#
(static) makeArrayUnique(array) → {Array.<T>}
Parameters:
Name |
Type |
Description |
array |
Array.<T>
|
|
#
(static) randomClaimId(entity) → {string}
Parameters:
Name |
Type |
Description |
entity |
string
|
Wikidata claim-ID. |
#
(static) randomEditGroup() → {string}
Returns a random ID which can be used for EditGroups.
#
(static) randomUuidV4() → {string}
Random UUID which can be used as claim-id.
Stolen from StackOverflow (of course): https://stackoverflow.com/a/2117523
#
(static) sleep(ms) → {Promise.<void>}
Waits the given number of miliseconds using `setTimeout`, then resolves the promise.
Parameters:
Name |
Type |
Description |
ms |
number
|
|
Returns:
-
Type
-
Promise.<void>
#
(static) summary(editgroup, summary) → {string}
Parameters:
Name |
Type |
Default |
Description |
editgroup |
string
|
null
|
|
summary |
string
|
null
|
|