wikibase-sdk
Advanced tools
Comparing version 7.13.1 to 7.14.0
@@ -7,2 +7,6 @@ const truthyPropertyClaims = propClaims => { | ||
const nonDeprecatedPropertyClaims = propClaims => { | ||
return propClaims.filter(claim => claim.rank !== 'deprecated') | ||
} | ||
const aggregatePerRank = (aggregate, claim) => { | ||
@@ -23,2 +27,2 @@ const { rank } = claim | ||
module.exports = { truthyClaims, truthyPropertyClaims } | ||
module.exports = { truthyClaims, truthyPropertyClaims, nonDeprecatedPropertyClaims } |
const { parse: parseClaim } = require('./parse_claim') | ||
const { uniq } = require('../utils/utils') | ||
const { truthyPropertyClaims } = require('./rank') | ||
const { truthyPropertyClaims, nonDeprecatedPropertyClaims } = require('./rank') | ||
@@ -28,4 +28,7 @@ // Expects an entity 'claims' object | ||
const { keepNonTruthy, areSubSnaks } = parseOptions(options) | ||
if (!(keepNonTruthy || areSubSnaks)) { | ||
const { keepNonTruthy, keepNonDeprecated, areSubSnaks } = parseOptions(options) | ||
if (keepNonDeprecated) { | ||
propClaims = nonDeprecatedPropertyClaims(propClaims) | ||
} else if (!(keepNonTruthy || areSubSnaks)) { | ||
propClaims = truthyPropertyClaims(propClaims) | ||
@@ -32,0 +35,0 @@ } |
{ | ||
"name": "wikibase-sdk", | ||
"version": "7.13.1", | ||
"version": "7.14.0", | ||
"description": "utils functions to query a Wikibase instance and simplify its results", | ||
@@ -5,0 +5,0 @@ "main": "lib/wikibase-sdk.js", |
@@ -10,6 +10,6 @@ # wikibase-sdk | ||
<div align="center"> | ||
<a href="https://wikiba.se"><img height="150" src="https://raw.githubusercontent.com/maxlath/wikibase-sdk/master/assets/wikibase.png" alt="wikibase"></a> | ||
<a href="https://wikiba.se"><img height="150" src="https://raw.githubusercontent.com/maxlath/wikibase-sdk/main/assets/wikibase.png" alt="wikibase"></a> | ||
<!-- yeay hacky margin \o/ --> | ||
| ||
<a href="https://wikidata.org"><img src="https://raw.githubusercontent.com/maxlath/wikibase-sdk/master/assets/wikidata.jpg" alt="wikidata"></a> | ||
<a href="https://wikidata.org"><img src="https://raw.githubusercontent.com/maxlath/wikibase-sdk/main/assets/wikidata.jpg" alt="wikidata"></a> | ||
</div> | ||
@@ -16,0 +16,0 @@ |
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
61917
1535