citation-js 0.7.19 → 0.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/citation.js +18 -6
- package/build/citation.min.js +1 -1
- package/package.json +5 -3
package/build/citation.js
CHANGED
|
@@ -15059,13 +15059,25 @@ function parseNames(values) {
|
|
|
15059
15059
|
return a._ordinal - b._ordinal;
|
|
15060
15060
|
});
|
|
15061
15061
|
}
|
|
15062
|
+
function getCountryName(value) {
|
|
15063
|
+
if (value.claims.P1813) {
|
|
15064
|
+
var shortNames = value.claims.P1813.filter(function (_ref2) {
|
|
15065
|
+
var P31 = _ref2.qualifiers.P31;
|
|
15066
|
+
return !P31 || P31[0] !== 'Q28840786';
|
|
15067
|
+
});
|
|
15068
|
+
if (shortNames.length) {
|
|
15069
|
+
return shortNames[0].value;
|
|
15070
|
+
}
|
|
15071
|
+
}
|
|
15072
|
+
return getLabel(value);
|
|
15073
|
+
}
|
|
15062
15074
|
function getPlace(value) {
|
|
15063
|
-
var
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15075
|
+
var place = getLabel(value);
|
|
15076
|
+
if (value.claims.P17) {
|
|
15077
|
+
return place + ', ' + getCountryName(value.claims.P17[0].value);
|
|
15078
|
+
} else {
|
|
15079
|
+
return place;
|
|
15080
|
+
}
|
|
15069
15081
|
}
|
|
15070
15082
|
function getTitle(value) {
|
|
15071
15083
|
return value.claims.P1476 ? value.claims.P1476[0].value : getLabel(value);
|