This commit is contained in:
Pieter Vander Vennet 2022-04-22 10:59:03 +02:00 committed by GitHub
parent 700cad1000
commit 426ba4a930
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -271,7 +271,7 @@ export default class Wikidata {
* Gets the 'key' segment from a URL
*
* Wikidata.ExtractKey("https://www.wikidata.org/wiki/Lexeme:L614072") // => "L614072"
* Wikidata.ExtractKey("http://www.wikidata.org/entity/Q55008046") // => "QQ55008046"
* Wikidata.ExtractKey("http://www.wikidata.org/entity/Q55008046") // => "Q55008046"
*/
public static ExtractKey(value: string | number): string {
if (typeof value === "number") {
@ -378,4 +378,4 @@ export default class Wikidata {
return WikidataResponse.fromJson(response)
}
}
}