Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wikibase-sdk

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikibase-sdk - npm Package Compare versions

Comparing version 7.13.1 to 7.14.0

6

lib/helpers/rank.js

@@ -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 }

9

lib/helpers/simplify_claims.js
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/ -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc