wikibase-sdk
Advanced tools
Comparing version 7.0.11 to 7.0.12
@@ -27,9 +27,10 @@ const { wikibaseTimeToISOString, wikibaseTimeToEpochTime, wikibaseTimeToSimpleDay } = require('./helpers') | ||
if (options.keepRichValues) { | ||
const amount = parseFloat(value.amount) | ||
// ex: http://www.wikidata.org/entity/ | ||
const unit = value.unit.replace(/^https?:\/\/.*\/entity\//, '') | ||
var upperBound, lowerBound | ||
if (value.upperBound != null) upperBound = parseFloat(value.upperBound) | ||
if (value.lowerBound != null) lowerBound = parseFloat(value.lowerBound) | ||
return { amount, unit, upperBound, lowerBound } | ||
const richValue = { | ||
amount: parseFloat(value.amount), | ||
// ex: http://www.wikidata.org/entity/ | ||
unit: value.unit.replace(/^https?:\/\/.*\/entity\//, '') | ||
} | ||
if (value.upperBound != null) richValue.upperBound = parseFloat(value.upperBound) | ||
if (value.lowerBound != null) richValue.lowerBound = parseFloat(value.lowerBound) | ||
return richValue | ||
} else { | ||
@@ -36,0 +37,0 @@ return amount |
{ | ||
"name": "wikibase-sdk", | ||
"version": "7.0.11", | ||
"version": "7.0.12", | ||
"description": "A javascript tool-suite to query wikibase and simplify its results", | ||
@@ -5,0 +5,0 @@ "main": "lib/wikibase-sdk.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
994
62598